Vet tech here..
Probably not. You need to figure out the cause of the cough. Older dogs tend to develop heart issue which coughing is a symptom of. Your best bet is to talk to your vet and have them examine the dog.
I’m not sure if this will be any help, but I just got over the flu that lead to a terrible cough! Honey as you probably know, did me a solid! It worked better than cough drops, etc… in past research that I’ve done for friends, I’ve read that dogs can have small quantities of honey, and if it helped me, something twice the size of a dog, I can’t imagine it wouldn’t a dog! I’ve heard it has helped! I’m no expert, just relaying experiences! I hope your baby feels better!