To answer OP's question, the etiquette is to stay near the curb and not let your dog step foot in anyone's yard.
If the inevitable happens, be sure to pick it up and take it with you.
If walking on a greenbelt, your dog is free to go anywhere he pleases. Just be sure to pick it up then, too.
As you've found, a lot of people don't care if you step into their yard, as long as you leave it clean, but others can be a bit more uptight about it. 4951