New baby and dog

💙Mia • Cajun & Proud, Conservative, wife to Royce 4.12.14 ❤️, mother to Bennett 8.12.15 💙
Is anyone here a dog trainer, or has spoken with a dog trainer about what to do with your new baby and your dog? Long story below: 
I have an 11 year old mini schnauzer who is very spoiled and jealous. He has had a routine for the past 11 years of being with me in the same room (laying in his bed on the floor mostly) when I am home, and sleeping in my room at night. He gets jealous sometimes when my husband and I hug each other; he will get up and come over to us wanting affection as well. But with that being said he is a very smart, good, friendly, affectionate dog. 
I know that you NEVER leave your dog alone with your child, no matter how well behaved because you just never know. I also know that you don't let your dog get close enough to your baby to harm them, even if you trust them, because anything can happen in an instant. 
Yesterday our neighbors brought their 4 month old over for a visit. My dog laid/sat next to my husband during the visit, until the baby made a noise/cried. When she would, my dog would run to her and bark; but not in an aggressive way, it was in a playful, curious, excited way. My husband would tell him no, get up and bring him back to where they were sitting. After a few times of this, my husband held onto his harness and when it would happen, he would say no and lightly pop him on the nose. 
I asked a friend, who has had several dogs and worked with trainers on how to correct this (his answer to my question was when the dog barks, say no, and once he stops, immediately give a treat - he will associate the word no with barking, and a treat with stopping, and he will quickly learn not to bark). But he then went on to say that you shouldn't let the dog in the same room as the baby for several months - keep the dog away from the baby until the baby can walk. This makes no sense to me. As I said, I know you need to keep distance between your baby and any animal - but keeping them in separate rooms until for months? He said "set separate times for the dog and the baby, when the baby is in the room with you, put the dog in another room, when the baby is in a different room, bring the dog in the room with you. This will teach the dog that the baby is ahead of him in the pack, and eventually he won't be bothered or phased by the baby at all." 
None of that makes sense to me. I've read up a bit on introducing your dog to your new baby, and everything I read says to have your dog in the room with your baby and give the dog extra love and affection with the baby in the room, and less love and affection with the baby in another room, so the dog will associate the baby with good vibes, kind of like the baby is a treat (IE: I like this thing because mom is extra special to me when it's around). 
I also think keep the dog out of the room of me and the baby would do more harm than good, because I feel it would teach the dog to be jealous and resent the baby. Currently my dog is in the same room as me 24/7 (and sleeps in the same room) when I'm home, as I've said. Once my son is here (due in 6 weeks), he will then be in the room with me 24/7 when I am home - he will sleep in a bassinet on the side of my bed at night. Am I really supposed to lock my dog away when the baby is in the room with me, and only designate certain times for my dog, while the baby is in a different room? I want him to understand that my son is ahead of him in the pack, but I also want my dog to get along with my son - I don't want him to ignore him and not be phased by him as my friend said. 
Help?