No, the dog will flee, but eventually calm down.
I had an incident where I had a henchman and accidentally performed a melee attack against him rather than the intended trapped animal (me targeting the wrong tile, not my character somehow hitting the wrong target). This caused him to become enraged, after which the dog attacked him, he injured the dog so badly it fled, my character fled/retreated, and eventually everyone calmed down without any fatalities and things resumed as normal.
When firing arrows you ought to first put it in your hand and then fire it, rather than using the method to pick an arrow from the inventory and firing it in one command. Both methods take the same (in game) time, but the latter involves the risk of a free line of sight being blocked by someone you don't want to shoot while fetching the arrow. Obviously, there's also the case of intentionally taking the risk of hitting allies, but then it's a calculated risk (but be aware that companions don't care one whit about whether any or their allies are in between them an a ranged attack target. I've had robber fights where friendly fire have caused a lot more injury to my team than the enemies did. It's almost standard routine to get arrows in the back during robber fights...).