I have bought a 1974 built Condo that had GFCI issues. A bathroom has a GFCI outlet and no ground wire attached. It has a red/white wire hook-up that functions properly. There is a metal box, however it not attached to anything at all. It just flops loose in the wall opening having a hole in the vertical 2x with just the wires running through the hole. A previous owner tiled the entire bathroom and the electric box 'ears' are behind the ceramic and tension the cover into place. It fails the ground test needless to say and the inspector wants it fixed for occupancy. The red/white wires seem to come from the light bar. Should I remove the light bar and try to fish a ground-wire up to a proper metal box there if there is one? If so, is there a test I can do to check for ground-ability? Getting to the main light switch from the outlet would be a real trick.
As to the loose box, a metal box should be grounded, but you can replace it with an "Old Work" plastic box. Just a few bucks. However, if you have to fix the ground connection (Not an NEC requirement as long as it labeled "No ground"), and you only have two wires running to that box, then your best to run new 12-2 romex to where that wire originates and make sure the wires are connected properly
If you have a GFCI outlet, it can accept a three-conductor grounded power cord. Therefore, that outlet must be electrically grounded. The only time an ungrounded outlet is permissible is when no ground connection is provided and only a two-wire power cord can be plugged into it.
Non-GFCIs are forbidden in bathrooms. Therefore, you cannot use a two-conductor outlet because nobody manufactures a two-conductor GFCI.
If this were mine, I'd open the light bar and look for a ground there. If one is there, it'd be an easy enough job to fish a bare copper down to the ungrounded GFCI outlet. Failing that (no good ground in the light bar), I'd try to find a way to drill up into that wall from the basement (assuming 1st floor), from where I could fish a ground wire to the outlet. Failing that, I'd cap off the wires in the outlet and cover it with a blank plate.