RE: Thief or no thief that is the question!
"It was too late to take it back to the store because the store had closed already, and how would it look if I now take back the ball to the store and explain to them what happened? Are they going to believe me or not?"
Since you now realized it, I think that the best move would be to take the ball back to the store, and explain the situation to the owner of the store.
I am sure that the owner would believe you.
Why? Because you are a grown-up man (adult), not a kid, and you bought dog food from the store. You have no reason to steal a ball. This was clearly accidental.
If you keep it with the knowing that it belongs to someone else, then you clearly/obviously become a thief. Especially, if you know who is the person, and you also know that you could give it back to him/her.
That is exactly what I am going to do...take it back! You can't imagine how this little ball has been bugging me...