I'm not talking about smacking, naughty step, punishment of any kind or telling off for trivial things. But if they do something dangerous, in your house or seriously hurtful/irritating to you what's wrong with calmly telling them not to.
Eg when BIL and SIL came to visit and their DNs were wrecking the sofa I asked them to stop (as in stop that please) and when they didn't I hauled them off. Why would I wait for someone else to do it in my house. Or if I am trying to eat a meal in a cafe and someone's child comes up and starts trying to rock my table, I say don't do that, it's not a nice thing to do, go back to your mummy.
Mostly noone minds. Once or twice people have got huffy. I genuinely don't get if you are polite about it what the issue is. Either it takes a village etc and you want your child to be socialised (which includes understanding that other people don't want you to do things which disrupts them) or only you as the parent can do it but then surely keep a tighter leash?