Yes, it is possible this is just a badly-upset tummy. But of course it could be anything else, too. Dogs refuse food when they are nauseous, and when they are in pain.
Even so much as a bad tooth can sometimes cause a dog to not eat.
But it sounds like your dog is feeling quite ill. You need to take him/her to the vet promptly.
You take your dog to the VET of course.Just like we go to the Doctors when we are ill.
Dont leave it too long as it sounds...... Very serious.