You said they wanted to talk to you about an administrative matter, so I'm assuming it was someone from work. If thats the case, they may have assumed that even though they were talking to you in a non-work envirnment that you would both slip into "work personality" for that and that petting their dog was more social than work.
My opinion is that if someone from work other than your boss approaches you outside of work, then the encounter should be somewhat more relaxed than at work, and a bit of social conversation should be made as well just to be polite. Petting the dog would be appropriate but not while they are talking to you. If it's your boss then you do not initiate social conversation but after he is done talking to you you can commit on the dog, such as "Nice dog". If your boss doesn't seem in a hurry and just say "Thank you" and turn to walk away, or if he tells you the breed or something about the dog, then you can ask to pet him, but otherwise it wouldn't be appropriate.
For petting other people's dogs, it's always best to ask.. Something like "Nice dog, can I pet him?" or you can ask "Does he bite?" with your hand extended a bit to show that your intent is to pet him if the owner says he doesn't bite. It's impolite to pet a strangers dog without speaking to the person first. It's actually impolite to pet anyone's dog without speaking to the person first if the dog is on a leash or walking beside them without one. You always acknowledge the person and speak to them, then the animal. It's the same as if you know a child who is out with their parent. Unless the child is a teenager you always speak to the parent first before you talk to the child although you can say hello to the child first and then introduce yourself to the parent.
_________________
I'm giving it another shot. We will see.
My forum is still there and everyone is welcome to come join as well. There is a private women only subforum there if anyone is interested. Also, there is no CAPTCHA.

The link to the forum is
http://www.rightplanet.proboards.com