My friend has a DD slightly older than mine though the two girls play well together. Her DD is rather wilful and can be quite a handful. I try not to let my DD away with anything and tell her off for bad behaviour. We are at the moment on a bit of a discipline trip which is working quite well as she's really been testing the boundaries of late. However after playing with the other girl she develops the same 'attitude' e.g. "that's not fair", "I want, I want", stomps off if she doesn't get her own way, refuses to do as she's told and really takes the mick.
The other day we were all together and my DD was misbehaving (being put up to it by other girl) and I told her off. She meekly sat down and said sorry but the other girl kind of looks at me triumphantly. Her mum says nothing. My friend has told me that she struggles with her and knows she lets her away with too much sometimes. Thing is on the odd occasion that her daughter has spent time with us alone, she is pretty well behaved so she knows she can get away with it with her mum. Don't actually know if there is a solution. I don't want to not see this family because I really like them including the girl, but it's just a bit more stressful than need be when we are out together.