Like End_of_Silence said, Pokemon inherit the Poke Ball of their mother. (Source if you still want one.) So this doesn't necessarily mean hacks at all.
So anyways, I found out that X and Y can't really be hacked to do that kind of stuff yet to be figured out, as Pokemon games are just getting harder and harder to hack each generation. But I'd bet that an Action Replay will be made eventually, although idk if that really counts as hacking. It will probably be hacked sooner or later though.
Btw, they usually aren't dangerous if they come from a Pokemon generator, I know from experience using several, such as PokeSav and PokeGen.