Hey NPavelka, I just think that the friend of your SO is jealous of you and decided to make you look bad. I also think Medea’s Child is kind of right but a little harsh and slightly exagerated. You’re going to need to learn that looking the other way is a hell of an offensive manoeuvre in this type of a situation.
It also sounds like the “why are you coming” question was said in the presence of the friend - you know, the girlfriend might not want to show friend that you mean too much to her. Hence, trying not to make friend feel like a third wheel by sitting next to you and (presumably) not ‘sticking up for you’ or, at worst, ‘playing along’. At worst, worst, ‘testing you’, but if it was that, I think you’d know deep down inside already that this relationship is all over but the breakup.
Anyway, I’d just relax, play it as no big deal, try not to bring it up first. If she does, you say, hey, yeah I sort of overeacted because I had a bad day and wanted to be alone with you and talk about [this really important whatever that allegedly happened to you earlier in the day]. And then make sure not to repeat the overly possessive behavior again. Ever. It’s a true sign of weakness - girls don’t usually go for that.
As good measure, too, I’d start bringing some eligible guys (or girls, who knows) along when you meet the girlfriend and friend together at the same time. Friend’s jealous behavior might just disappear if she has an SO of her own…or at least somebody she’s trying to impress during dinner.