When she is in Kindergarten, she will learn further, about social behavior. Or if it is a problem, the Teacher will notice or other kids will complain, and the Teacher, will kindly... try to "correct" it.
My friend's daughter, has a friend like that.
Though older, her daughter gets real irked, because this other girl is real 'possessive' about her. Not liking if she plays with others etc. Or telling others they can't play with her, she is HER friend etc.
But well, so my friend's daughter, just speaks up and tells her no you can't tell me what to do and you can't decide who I play with or not.
And slowly.... she distances herself from that girl.
Guide your girl.
I know a girl like that in my daughter's class. This was in 4th grade. The girl complained to me saying "your daughter doesn't want to play with me or play what I want..." So I told that girl "You CANNOT control others, or boss them, or tell them who to play with or not. And you cannot MAKE a child play with you or force them. You cannot force... a person to play with you. And they can't force you to play with them, either. A person can say, no." This girl, well all the kids know she is like this. Pushy. And then complains when others get tired of it. But then I noticed, that she has since then tried to be less, pushy.
Your girl is young. She is excited about "friends." But friends... are not "possessions."
I teach my kids that if they want to play by themselves, they can. Nothing is wrong with that. And if they don't want to play with someone, or if the friend is being possessive, they can say no. In a nice way. Its fine.
Your daughter is 5. Sure you can let her work it out. But that doesn't mean she will. To me, a parent NEEDS to guide their child. And teach them... about people/situations, etc. It cannot be guaranteed, that a child will work it out on their own, without your guidance, especially when they are so young.