I have a flawless, japanese ditto that I was told is legit,it was allegedly RNG abused in BW. Is this possible? If so,would I be able to breed it with another flawless in X and Y to eventually produce a shiny flawless offspring? I don't want to try and do something that would get me in trouble here, which is why I would love for this question to be answered.
You can always just be honest when you trade mons here. Many people do not actually care whether the pokemon is hacked, only whether it is legal. There are, however, many people who do not want any hacked pokemon. So you should be upfront about any possible hacks (which is why there is a general rule that whenever you trade you always give the so-called "origin story" of the mon).
I personally don't see what the big deal is about hacked, legal pokemon, but whatever. The Pokemon Bank already checks whether a pokemon has a legal combination of ability, moves, and IV/EV. It also checks for some event pokemon. But a lot of the "hacks" you see on the wifi forum here, other than straight up illegal pokemon, are just pokemon who have illegal combinations of purely cosmetic features, like shiny event pokemon or something. (There are also some caveats about which Natures are allowed on flawless pokemon in gen4 and gen5. Surprisingly, not every caught flawless pokemon can have any Nature.)
The only possible way to tell if a mon is the offspring of a hacked parent, IIRC, is whether the Poke Ball inherited from the mother (?) is a legal combination. Anything else like shininess, ability, movesets, etc. is automatically legal since it was bred in-game.