I have a little 5 year old girl that acts about the same with my daughter. And OOOO! The way she bosses her mom around as well!! I can't believe it -rude! She actually hit her mom the other day! She's a nice enough girl, just used to getting her own way, and thinking she has leeway to argue. I appreciate her though for the simple fact that she's even bossier than my 5 year old girl (who's constantly trying to boss her siblings, cousins, and friends around)At least my daughter is getting a taste of her own medicine!
Everytime they get in trouble, my daughter says "Well, Lexi said..." and I remind her that no matter what her friend said, it was my daughter's choice to do or not do what she said, and she should have taken into account what she knew personally to be right and wrong and acted on that instead of somone elses say-so.
Her friend is constantly disavowing their friendship, which upsets my daughter, but I just blow it off, telling her not to worry about it because I'm positive they'll be friends again in no time! (This is SOOOOOO common as a behavior for both genders at this age - someone is constantly "not someone's friend") They're always friends in an hour or two.
As far as the friend's behavior at my house goes, I am frequently rephrasing her requests from "I want some juice" to "Do you mean 'May I have some something to drink please?'" and I've learned to just say to kids like that things like "We don't do that here" or "It's not very polite to play with someone else's toys or in thier yard if they are not outside with you. You need to go home now. Maybe you can play later."