Famotidine (Pepcid AC®) and cimetidine (Tagamet®). These medications are used by to treat or prevent heartburn in people, and they work on dogs too. By. NSAIDs are usually the first choice for relieving pain in pets, but if your dog needs more options, your veterinarian might recommend Tramadol or Gabapentin. Plain rice is one of the best foods you can feed a dog with diarrhoea. Why? Mainly, because it's so easy for dogs to digest. Containing a large amount of fibre.