I agree. The vet is the best one to evaluate the cough. If it is a hacking kind of cough it can be indicative of worms from eating a flea.
Yes, he could have "kennel cough", very common in dogs. Kind of like a human cold.
I would definitely take him in to be sure.
Welcome to the dog forum, there are very informative people here w/great suggestions, advice, ideas, experiences...so check in from time to time to see your replies..
I would advise to get into vet...if sudden coughing becomes apparent...then maybe hes chewed something and its caught, kennel cough air bourne...if hes been around other dogs or in public...it would seems something is not right and that you probably already know...
Tip: If my dog has a hair or something aggitating him, I give a little bread w/butter, the butter picks up the hair and the bread take is down the stomach...
Good luck, keep the forum posted of your outcome...