Traca, don't fret about it too much, it is a very common mistake folks make, here are my thoughts
I have trained many dogs; we've had show dogs, breeding stock, and just simply pets, all well loved pets. In recent years, I was trained with my dog to do pet therapy and that is when I learned much about dog protocol. Many dogs have issues with food, just like people do. Since they cannot tell us about it, the rule is, never to feed any dog anything, unless it is your own dog. We never feed our dog out of our hands unless it is a training treat. It makes for bad behavior, and is the reason your friends dog was under the table begging. That is considered improper behavior among animal behaviorists and trainers. If you want to offer a treat, ask the owner first, and then put the treat in the dogs dish. Our present dog has not been fed non-training treats from our hands, only put into her dish. She is also not allowed in the room when we eat, unless she is in the corner lying down, and never when we have company. She has a bed nearby and she can see us from there.
It is very dangerous for a dog to be under the table. Case in point, one of our dogs was under the table at our sons home, when the child next to me spilled their milk. I pushed back my chair quickly to get up, and hurt my dog. From then on, with our new pets, they are not allowed under or around the table.
When I was working hospitals, assisted living facilities, and schools with my pet therapy dog, everyone wanted to feed him treats, even the patients would offer food off of their plates. The dogs focus was to be comforting to the patient and not to focus on foods.
So the bottom line, do not offer anything to other peoples dogs, even the annoying barking dogs at the next door neighbors. You take the chance of giving the animal something that could make them sick.
You did the right thing by showing concern the next day. My husband and I are still learning after all our years of having dogs. That cute little game your fur kid makes up to play with you can cause issues with guests. Our dog trainers advised to put the dog away in a bedroom with his bed and water, when company comes. Leave a light on, and radio or TV to keep them company. Works like a charm. If guests approve of it, you may let the dog out to say hello to the guests, and visit for a short time. If it is family, and they are OK with it, the dog many stay out all the time but never present rude behavior such as jumping up on them, when standing or sitting, or begging.
Hope this helps, it is more than you asked for, but I do love to educate folks about our beloved pet partners who love us unconditionally.