It can, kinda, long story ahead...
A long time ago, I caught a crapload (well, probably 5 or so) of 'M and Missingno., and about a month later my game was erased. I made a new game and did more glitches this time than just the "Old Man Trick". I ended up experimenting with the "Cooltrainer move" (the 00 move) by swapping out Ditto's Transform for a blank spot (You have to transform and swap the first move with something else, and after the battle it becomes glitched).
I observed that occasionally rather than just "DITTO used !" (and the occasional Super Glitch) you would get text such as "DITTO used ELECTABUZZ!", "DITTO used ARCENINE!" etc. I also observed that these were Pokémon in my current box. So, I switched to an empty box and played some more. This time it spat out the name of my previous savefile.
This would suggest that glitches can leave remnants? Or perhaps that it had a sort of backup remnant from the previous savefile, that can't be accessed without glitch?