The only method that isn't a glitch that would've prevented your Tympole from healing is if your opponent had used the move Heal Block.
If the opponent did not use Heal Block on you, then yes, this is a glitch with your game.
As for why it happened, who knows. Games glitch out all the time. No game I have ever played is completely free of glitches or bugs, and there is always some certain thing you can do to mess up the game. Hacking the game makes these glitches more likely to occur, but since you said you haven't done any hacking, it's just a game being a game. Just be glad Pokemon isn't Elder Scrolls.