My granddaughter is 9 and in the 4th grade. I've been a playground volunteer for several years now. I think that what is happening with your daughter is for the most part normal. She is learning social skills.
My granddaughter is sometimes jealous when one of her friends plays with other kids who are not also my granddaughter;s friends. And she is also bossy and wants to run things. I've noticed that most of her good friends are more follower types. She does struggle with other leader types.
My granddaughter has many best friends. Depends on the day which one is really her "best" friend. I would encourage your daughter to expand her circle of friends. You can do this by arranging play dates with girls who she's expressed a liking for. One girl at a time. I often spend time with my granddaughter and one other friend and when things start getting a bit touchy I make suggestions to one or both. For awhile it seemed my granddaughter had difficulty stopping what she was saying or doing when her friend indicated that she'd had enough. I'd say something like, "Mary is asking you to stop." When my granddaughter would ask Mary if that's what she wanted, I encouraged Mary to say yes or no. Either way we'd have a conversation about what was going on.
When my granddaughter would complain about someone or about a situation I would ask her how she felt and would then focus on her feelings first. When she seemed ready I'd bring up an idea about what the other person might be feeling. Often she didn't want to talk about the other person's feelings and I'd let it drop. She;ll learn over time as she's ready for a different way of looking at something.
For now the most important thing for her to learn is to recognize how she feels and how she can control what happens based on how she handles her feelings. For example, jealousy is often acted out in anger which can result in pushing a friend away. So what else can she do? She can join her friend and play whatever they're playing. It will take time for her to develop the skill required to do that.
It's important for us as adults to remember that relationships at this age are very fluid. Someone who's a friend today is not one tomorrow but then a friend again the next day. Sometimes days go by with one girl not talking to another girl but if left to their own devices they work it out. Often it's just time that's needed.
It is good to find a way to help your daughter understand how another child feels but I wouldn't do this by treating her mean. Instead I'd show her how to relate to another by helping her to feel good about herself. In role playing I would show her the skills that encourage co-operation. For example: when you're playing a game and she's bossy, tell her that you don't feel like playing when she acts that way. Suggest that you'd really like for her to let you use this game piece and she could use which ever one she wants to use.
Praise her every chance you get when she's getting along with you or other people even when you're not playing with her. If she's embarrassed, praise her quietly. Or, do as my granddaughter started doing with me, raise your thumb upwards. This has become a silent signal between us. I feel good when she gives me the thumbs up sign, too.
Often kids are bossy and mean because they feel insecure. Somehow feeling in control helps them to feel more secure even tho it gets them the opposite of what they want. I suspect it is related to being able to blame the other person because they didn't do what they wanted. This makes the key to helping kids learn social skills to doing whatever will increase their self-confidence and sense of security.
Modeling social skills is also helpful. Involve your daughter with some of your activities with friends.
Finally, your daughter is young. Many, if not most, leader type personalities have these same difficulties at this age. Praise your daughter for being a leader. Encourage her by telling her that she's learning and that you know she'll figure out friendships. And do let her figure out what to do after you've listened to her talk and validated her feelings. Ask her if she wants suggestions on how to do it differently and then brain storm together.
Focus on the positive. Downplay the negative.