How do you handle it when another person’s kid steals something from your kid?

This happened to me at the library today and it has happened before too. It’s so awkward! This little boy stole plastic fruits and veggies from my daughter and I’m like sooo do I say “it’s her turn right now, she was playing with that” or do I tell my daughter “share with the boy” even though he took it out of her hands. I don’t want it to come across as I’m trying to discipline the boy by telling him it’s not nice to steal from others, but his mom was nowhere in sight. Has this type of thing happened to anyone before?! I’m assuming it’s fairly common. How did you handle it?