Yes and no. Before you give any medication whether an over-the-counter or prescription drug to your dog (or cat), you need to discuss it with your veterinarian first.
For example, your veterinarian may recommend giving your dog Benadryl (diphenhydramine) or Claritin (loratadine) for allergies.