This Flareon was hand-bred by myself a few years ago in XY. I can state 100% surely that it has never been edited or hacked (I only do save backup, that shouldn't count).
But this memory is correlated to have the skillful ribbon, which it doesn't have.
I do see some similar issue in this thread, the poster said the Arceus had the same memory and was never hacked.
I used to use the battle recorder to test my mons against the recorded Battle Chatelaine. I don't know if this is the reason why it got the memory but without the ribbon.
In the other thread, Arceus can't have the memory theoretically in PkHex because it can never pass the team check. However, using the battle recorder can bypass the check. That also explains why it got the memory in the actual game.
I have tested a few battles just now in XY in the battle recorder, but I wasn't lucky enough to overwrite the memories. Or there is another way to obtain this memory without defeating the Battle Chatelaine?