Hi Sir or Madam,
Licking the carpet excessively could be a sign that your dog has nausea or a problem with anemia, a liver issue, or even a seizure problem. If this is a new behavior and there weren't other symptoms, I would try some pepcid. Read about dosages and usage information here:
Given the other symptoms, nausea is a strong possibility and with the distended stomach, it could be quite serious. It always worries me to hear about a dog with a distended stomach as this could indicate bloat. Bloat (Gastric Dilatation) may or may not involve stomach torsion (twisted stomach). Common symptoms are attempts to vomit (usually unsuccessful) and may continue to try to vomit, dog just doesn't seem like themselves, a hunched up posture, anxiety and restlessness, a distended stomach that is tight like a drum, gums may be dark red in early stages and white or blue in later stages. These are the most common symptoms and the list goes on. If you believe your dog has bloat they should be seen immediately. Simethicone products like gas-x may help while you take him into the vet.
You can read more on bloat here.
If your dog eliminated this morning then constipation should not be causing a distended stomach. If not then constipation can cause abdominal pain. Parasites can sometimes cause a distended stomach and lead to a loss of appetite as well though we usually see abnormal stools with parasites.
If your dog may have ingested a bone or sharp pointed object, it may have punctured the gastrointestinal tract. You can read about this here:
Cushing disease can cause a bloated stomach as well. You can read about this condition here:
Only you can see exactly how sick your dog is and make the determination on whether an ER visit is necessary, but I can give you the possible causes to help you make the decision. The following site should help you locate an ER vet.
I hope this information is helpful to you for that purpose.