I totally get what you're saying about girls being expected to be polite while boys aren't, but in my opinion it's boys that need to be held more to the standard that girls are, rather than the other way around.
She needs to understand that she doesn't have to feel pressured into doing things, that is of course very important, but I don't think the teaching should stop there. She needs to learn to recognise the difference between when someone is maliciously pushing her into something, and deserves a blunt rebuff, and when they are just trying to be nice, in which case she is still entitled to say no, but is being unkind by not trying to say it in a way that isn't hurtful. She is young and that kind of empathy will be new to her, but she is getting to the age where it is a worthwhile skill to focus on. She needs to start learning it is unkind to be so abrupt to someone who is just being nice to her.
(I should say that similarly, the other child needs to start to learn to respect people's space, and not call so many times, but this is about your daughter so that is seperate)
I also noticed this:
I'm also a bit reluctant to tell her she has to do things she doesn't like out of politeness
I think this is a similar issue - it's possible to be too black and white in this regard. Broadly it's a positive lesson, but actually, doing things you don't particularly want to do is a natural part of life. She needs to know that she should never feel forced to do things she is uncomfortable doing, but friendship is give and take, you need to be open to doing things both that you enjoy and that the other person enjoys, and too many "no I don't want to do that so I won't" can become quite antisocial and self absorbed. Also, we all have to do things we don't want to do - school, work, chores, and a strong, simplistic message of "you shouldn't have to do things you don't want to do" doesn't really equip children to become functioning members of society.
It's a minefield, I realise, but my point is that I don't think you need to avoid ever inferring to your daughter that she should learn to think of people's feelings and reject them politely, or consider doing something she doesn't actively want to do, because whilst there are instances where people may take advantage of her and she needs to be equipped to be assertive, a majority of the time these will be perfectly innocent social interactions with people who deserve politeness, and she needs to learn the difference.