Fox, there are many sections that are violated. It's like bad grammar .... you have to know the language before you start parsing sentences.

First off, there's basic vocabulary. Grounds are grounds, and nutrals are neutrals, and never the twain shall meet (at least, never after the main disconnect.)

Code forbids 'objectionable' current over the ground wire.

Code required grounds to be green, or bare - and neutrals to be white. Code does not allow these colors to be changed with a scrap of tape either. Neutrals are also required to be insulated- and the ground wire in household cable is generally not insulated.

Here's what you have: you have the result of a cheap-skate who ignored good design at the time of the original install- opting to run the code minimum for the required light. I'll bet that ceiling box isn't supported to hold a fan, either.

The poor planning was then compounded by some handy-dandy who figured out a way to 'make it work' without needing to replace the cable. Understandable- who wants the job to take all day, and rip open walls or crawl attics if they can avoid it?

Ironically, you could have avoided this by spending another $20 at the box store for a wireless remote for the fan - though that still doesn't address the question of supporting the box.

I suggest first making sure the box is supported well enough that you can swing from it- unless you like sleeping in body armor.