If the axe was a holding item and you switched it with opponent Pokemon, it shouldn't stay in you. Doesn't matter wild encounter or trainer. Only bosses return your holding item after the battle. That is if you used such a move during some battle tho.
If you remember which Pokemon you had in your party, and you haven't changed their moveset since then, then you can find out if you have a move like that, even tho you may not remember.
If it was in your bag and not a holding item, then something else must've happened to it.