Earlier quoted context omitted.
English is not my first language, but yes, to my knowledge that is grammatically correct. Maybe it is a bit ambiguous, although from the context it should be reasonably clear that I was with my (now-ex) girlfriend for that period of time, and not with OkC itself :)
Most English speakers would say, "a woman who I was with for 3 years." In this case "with" is understood to mean in a romantic relationship. I don't think what you said is technically correct. "With whom I was" calls for something (a verb or phrase) to be tacked onto the end, but it would still be awkward. For example, "with whom I was dating for three years."
Actually, I'm pretty certain you're supposed to use "whom" there, not "who".