I never ask, but, I never approach/attempt to pet, either.
If the animal approaches me, then I extend a proper greeting, but ONLY if I'm approached FIRST.
I've always said...
"
Dogs know that you love them, weather you own them or not."
On the other hand...
I rarely take just one of my guys out. Sneakers (5yo M Alpha) always accompanies us, and like at PetSmart, I use a Shopping Basket for my guys. Just don't like them accessing the floor there....yuck !
Anyway, I don't have to tell someone not to pet !
If they even get close to my Females or Pup, Sneak will let them know they're out of line, and may leave them with a lingering reminder requiring a Band-Aid !
I try not to laugh, when I see someone snap their hand back as fast as they can, and only say "That's not a good idea" and move on.
IF they are polite enough to ask to touch/pet...
I have to pick one of my guys up and stand away from the Cart a little. Sneakers doesn't trust my judgment all that much, when it comes to someone else messing with "HIS" pack, and complains loudly. So, those instances are brief.