Side note: Years ago you were allowed to run a ground wire to a metal box but thought that I read a few years ago that is no longer allowed. Believe article or person stated that if you are able to install a ground wire would be safer to pull in a new NMB cable to replace the NM cable without a ground wire
Its still allowed, unless you have a local amendment banning it, see 250.130 (C).
I often find it easier than re-wiring or replacing a old metal box in lathe and plaster.
I have ran into situations where the old box has C shaped channel that the lathe sits in so there is no way to remove it without disturbing the whole wall.
I run a solid green back to the nearest point on the GEC.
What is illegal is running to something else like a metal water pipe.