petMD states that it is safe to give a dog Kaopectate to treat diarrhea. Only use Kaopectate as it is bottled and sold in the US, as other countries may use alternate ingredients harmful to dogs.
Lakeside Vets states that the proper dosage of Kaopectate is 1 teaspoon per 5 pounds of the dog's weight. If the dog's condition does not improve over the course of three or four doses, consult your veterinarian for an examination. Side effects may include fever, lethargy, abdominal pain and constipation if it is used in high doses. Kaopectate should never be given to cats, as it is toxic to them.