It does look like a lens retainer ring for a lamp of some kind? This photo of a miners cap lamp parts shows a round ring that would screw on to the lamp housing to retain the clear lens. It could also be part of a sight glass, such as on the side of a hydraulic oil tank of a tractor so you can see the fluid level in the tank. Exactly what it is, we may never know.