In the movie Gladiator's opening scene and more recently in the newest Call of Duty you can use attack dogs, but it seems like it would be difficult to get dogs to attack only the enemy.
During the Conquest of the Americas, dogs were very important for settlers and conquistadors. While guns and horses were valuable tools of warfare and brought fear into the equation of warfare, dogs served as a shock troop element that brought chaos and disorder to the enemy. The Europeans brought large mastiffs with them when they came to the the Caribbean in the 1490s and then to the mainland of the Americas in Spanish Florida, Mexico, and the northern coasts of South America. The dogs were trained to follow the scent of various indigenous groups and attack when ordered. Usually, the dogs were starved to some extent and then let loose upon indigenous villages where they might eat the weakest members present. From a tactical sense, the dogs would prevent the indigenous groups from preparing defenses and allow the Europeans to move in closer with cannons and horses and eliminate the remaining defenders. The Europeans had a healthy respect for the dogs and punished fellow Europeans if they abused the dogs in any way. There is evidence that individuals who beat the dogs or teased them were whipped or sent to less desirable areas of the Americas as punishment. There are some decent studies on this topic, but I would recommend Dogs of the Conquest by Varner and Varner.