It doesn't sound like you did anything wrong. So that leave very few options. Maybe she thinks of him as a friend so she wasn't uncomfortable with the two of you being in the same place. Maybe it strokes her ego to have more than one guy at a time. She is the only one who knows the reason for this. Don't think of her as a bad person until you find out the reason for her decisions. If this feels hurtful then you should tell her so. She may not be aware that this bothers you. If she is playing mind games or she doesn't see your point then I would consider moving on. You don't need someone who is not considerate of your feelings. I would wait until I had a long talk with her. If she is truly playing games then you don't need someone like that. Don't tolerate someone who is playing both of you. See where it goes.
If this has been helpful press accept