According to Pet Education, milk of magnesia, an antacid, is safe to give to a dog when directed by a veterinarian. Though it is an over-the-counter medication, it has not received FDA approval for use with small animals, so dog owners must seek medical advice before dosing their pets.
Milk of magnesia treats heartburn and upset stomach, but it is contraindicated in dogs that have kidney problems and in dogs that are pregnant or nursing, Pet Education indicates. Newer medicines are available that are often more effective and better tasting. Side effects of milk of magnesia include diarrhea and electrolyte imbalances.