It seems you're having the problem of "turning off" your military dwarves. So far, the only way I have found to make the dwarves stop chasing an enemy, is by setting them to Inactive.
This was the only way I was able to save my dwarves from an unkillable quadruped. They had thoroughly beaten it, but since it was unkillable, I had to find a way to keep that thing from going anywhere, and get all 20 of my axedwarves back to safety. So what I did, was just assign ALL of my wardogs, 16 at the time, to the weakest axedwarve in the bunch, wait till the dogs arrived, and turn the military back to inactive. The dwarves turned back into civilians, and commenced to booking it out of there, while my 16 war dogs and their 30 puppies stalled the beast. Then, to cutoff all possible threat from the beast, I just walled everything in, the beast, puppies, and dogs included.
I successfully saved all of my military without any injuries, though the fight between the dogs and the quadruped was not going so well. Since pets don't need food or water, they were stuck in an eternal life and death battle. It became worse as the war dogs continued to have puppies during the battle, and the quadruped was unable to kill the dogs fast enough, so what started out as 16 war dogs and 30 puppies, ended up being 16 war dogs, 5 dogs, and 43 puppies, all agains one forgotten beast. It totally destroyed my fps, so I decided I'd just drown them all in water, and let the unkillable beast lay at the bottom of a dwarf made lake for eternity.