“But you shouldn’t feed another person’s dog without asking first.”
It kind of depends on the situation. If you’re having a party with a lot of guests, and you don’t want someone to slip someothing to your dog, you should probably corral it in a non-public area. If my late father was at, say, a BBQ and the hosts gave him a steak or other meat that was crap, and the host’s dog was wandering around the backyard, the pooch would regularly be treated to my dad’s tough-as-gristle steak, burger, whatever.
I would still ask. It’s arguable whether the dog should be sequestered in that situation; but you probably don’t know the dog’s health, food sensitivities, if any, or the owner’s training schedule.