First, good on you for taking him to the vet!
You are right that there is a behavioral element at play, though. Your dog is attempting to establish dominance over your new beau, but try not to think of it as him marking his territory. Dogs have an inherent need to establish a pecking order for their own well-being as well as the propogation of the pack. Now, you can't change the instinct, but you can change your dog's perception of its situation.
If your dog sees your man as a lesser animal, his interaction will never get better and could potentially worsen (ie. growling, bullying, and biting). They get along great right now, but you never want to risk a dog biting a person.
The dog needs to understand that he is a member of the family, but he is not in charge. What I would recommend are a few subtle habits to help establish your man as being higher on the totem pole.
Have your boyfriend feed the dog. Being the food source is a powerful factor in the canine hierarchy. The second the dog has adjusted to taking food from him, have boyfriend start demanding a trick or two before feeding. Even if it's just a simple sit or shake, you're establishing that he needs to obey before getting what he wants.
Have boyfriend hold the leash when taking him on walks.
Reinforce good behavior with treats, pets, and praise.
If you have not already done so, you need to thoroughly clean all the areas that the dog has marked using a cleaner with a urine-dissolving enzyme. I recommend Nature's Miracle, but find one that works for you.
And I would advise against letting your dog on your bed. It's your call, but you're trying to establish that your dog is not an equal and sharing a bed sends a powerful message. Best of luck!