We've had experience with a Girl X.

When I started seeing much of the same behaviors as detailed above, I pointed them out to DD (now 11, but we noticed it when she was around 9 and had just met this friend).

I asked DD "do you think she's being a good friend when she does stuf like that?" or "are you happy when you never get to win and she changes the rules?"

I didn't think it would be very helpful to play the mommy card and just cut off contact with the other kid, so I worked on showing my kid that it wasn't a healthy friendship, and curbing contact where it wasn't noticeable.

The more aware DD became of the inequalities, the more she started putting her foot down. I don't think kids are born knowing what's a healthy friendship and what's not-they have to learn both from the positive ones and the negative ones.

Of course, the more she put her foot down, the less friendly the other kid became. My kid was sad, because she could sense the loss of attention from the other kid, and I was sort of like, well, she's not really looking for a friend, she's looking for a minion. Do you really want to be her minion?

The good thing is, the more confidence DD gains in herself, the less interested she is in hanging with Girl X.

So now they're "friendly" but not "friends" anymore, and DD has moved on to other friendships.