Dimmer with ungrounded box
If it's there, the switch will pick up ground via its mounting screws.
The rule of grounding is if there's a metal  box, the wiring must ground to the box as its first priority. Ground to the box first, only then have pigtail grounds to receps and switches if they're needed (which they're not on switches; certain receps need that).
Keep in mind, some modern dimmers require a ground to perform properly.  They have gotten permission from UL to use ground as a current return, because their device inherently will be leaking too little current to possibly matter, and has internal safeguards so no foreseeable damage or failure will cause more.  The upshot is that if ground is no good, the device might not function.
I agree that it looks like metal conduit or possibly AC cable, which provides a ground path to the box. (and again the rule is &quot;must ground the box first&quot;).