Talk to your daughter when her friends are not around and explain what you have observed. Tell her that you want to help her with this behavior, and set up a signal (saying a secret word, touching her shoulder) that you will give her when you see her being too bossy.
Keep in mind, though, that this is how we learn to be social beings. Children try out behaviors on others and learn from their reactions if that is a behavior they should keep or change. Her friends telling your daughter to stop or refusing to play with her will help her learn to be less bossy.
Talk also with the school counselor. He may be able to give your daughter some individual time or include her in a small group on good social skills or on being a good friend.