Had an eerily similar thing happen to me once.
We had to make a pretty big report on art nouveau (it's a type of architecture, not important right now) and points were awarded individually (You had to keep track of exactly who did what to help make the report and you got points based on how well you did those things) We simply divided the report into 5 sub-parts, one for each member of the group.
Everything went great but once we got the points it turned out 1 of us (let's call him Mr. X) got way less than the rest (I guess his part wasn't that great.) So he got mad and claimed he actually wrote large parts of the other 4 guy's parts. Than the teacher in turn got mad at the 4 of us for "lying" and demanded we "told the truth."
And that's when things got... ugly. Because if Mr. X could get us to admit that he partially made our parts of the report, some of our points would go to him. So he tried to make us sign a piece of paper that said he did. I was the first one who got confronted with that paper (totally out of the blue) and since we were friends and I felt sorry for him since he did put in effort, I wrote it was indeed possible. After all, at the time we were all working in the same room so we all helped eachother out here and there.
Later however I heard the that 1 of the other 3 guys, who is also one of my best friends, was pretty much pinned to a wall in the middle of the street and threatened by Mr. X. I don't know why he didn't do the same to me but it's probably because I could take him in a fight while my friend probably can't. My friend still refused however and if his little sister hadn't been there, they would've fought over it right there on the sidewalk.
After that happened I immediatly wrote a polite but VERY resolute email to the teacher that Mr. X would get some of my points OVER MY DEAD BODY. After that, the teacher sort of stopped supporting Mr. X's little crusade. He still tried to get us to sign though. Eventually I even had to throw him and his friend (Yes, he brought a homie) out of my house.
Much later I ran into that teacher again and he told me he was still impressed by the wording of that one email and that I was the only one of the group who didn't have some of his points transferred to Mr. X.
Needless to say Mr. X and I are no longer friends, even though we had been since kindergarten. Although I still meet him sometimes and he likes to act like it never happened.
So my advice: write an email to your teacher and very firmly state you did not have anything to do with her actions. But for the love of god stay polite. You don't have to swear in order to show you are serious. In fact, not swearing makes you look more serious.
Also, don't worry about the fact that she is (sort of) your friend. I know you are worried about f***** her over by telling your teacher she stole your work. Because that would end your friendship. But guess what? She already f***** YOU over, so your friendship is already over either way I'm afraid. And you have every right to f*** her right back.
If you really must you can confront her first, give her a chance to explain what she did. But going by what you wrote I get the impression she knows damn well she screwed you over.
Also explain the whole situation to your girlfriend and make sure she knows you are being honest. Than let her make up her own mind. Remember: this isn't your fault, it's her friend's. If she still dumps you... Wel you really don't want a girlfriend like that anyway.
Remember: learning to deal with situations like these is just another part of learning to work in groups.