Horse is showing holes in training. He is doing what he feels like when it suits him, which may be most of the time, but when something different is going on then he is showing you aren't in control.
Other horse or not, or whatever, his attention should be on what you are doing with him.
Make him focus on you, correct him when he acts up, and while turning him out with the other horse to play may seem like good idea? Much will depend on how roughly they play and how much you want to give your vet. Unless both were my horses, I wouldn't do that.