I never encountered bugs like this with my hunter, and I am playing it since pretty much ever. Are you sure that you'r pet is not on aggressive stance? In that case he will randomly attack whatever he see all the time, even if you click on stop attack ability. Also take in mind that if you set him on defensive/assist stance, as long as there is someone attacking you/you attacking someone (damage over time abilities count too, like for example, active serpent sting on target, poisons, etc etc on either you or your opponent) the pet is supposed to attack him automatically. Then if you set them on passive, they wont attack anyone if you don't make them to attack, if you set them at stay, they wont even move, no matter what you do(except clicking on other stance). All this things are intendent to work like this.
*1 more thing, considering you are lvl 13, please be sure, you have finished the full quest chain for pets.