I could have written your post OP.
I just keep talking to my DD about the situation and offering advice, particularly getting her to stand up to her 'frenemy'. The worst thing for my DD though, is that even though there are lots of other children she can play with, and she's happy to play with them, she feels lonely when she's not in the friendship group with the frenemy in.
So, the main thing I'm doing is discussing those feelings of loneliness and hopefully making her realise that she needs to accept feeling lonely for a while until she establishes new friendships. Feeling lonely for a while is better than allowing herself to be treated like dirt by this supposed friend. I think it is starting to sink in.
However, I have told my DD that I'm not having this 'friend' over to play any more, mainly because, the last 2 times I've had her to play, the girl has treated my DD horribly for the whole of the following week and my DD has been in tears, so I've told her it's just not worth having this 'friend' to play. If she carries on being friends with her at school, then so be it, that's up to her really and all I can do is hope she follows my advice and plays with someone else.
I have mentioned the situation to her teacher as well, but only because a similar thing happened to my older DD, and I didn't bother telling school, but then the Y6 residential happened, and the teacher put my DD in a dorm with the friendship group she'd just recently managed to extricate herself from. The whole week away ended up being pretty awful for her, whereas if she could have been put in a dorm with some other girls, it would have been an opportunity to build new friendships. It wasn't the teacher's fault - they didn't know anything about what had been going on.
I am definitely NOT going to say anything to the parent of this child though.