You can give a dog Imodium. Imodium is not formally approved for veterinary use by the FDA, but it is used both as a prescription and an over-the-counter medication to treat diarrhea in dogs.
Imodium is a mild narcotic. It works by slowing down the digestive system, allowing it to recover from diarrhea and reabsorb water, resulting in firmer stool. Dogs may experience bloating and constipation from taking this medication, but it is generally considered safe despite the lack of FDA approval. By contrast, Imodium is not commonly given to cats because it causes agitation and distress due to differing biochemistry. Dogs with hyperthyroidism, liver or kidney disease, or a sensitivity to opiates should not be given this drug.