Thank you for your question.
There is no evidence that a dog can catch a cold or flu from a human. They are genetically not susceptible to our viruses. They have their own viruses that spread a cold or flu among other dogs. There was a case a few years ago of a cat catching a flu from its owners, however.
On the other hand, you can catch things from your dog. It can carry around parasites that are spread to humans. That is why it is important to bring a stool sample to your veterinarian at least once a year.
So when you are sick at home with a cold or the flu, don't worry about letting your dog comfort you. They will be fine.