Yes, +1 ^^^
The oil level sensor is on drivers side of oil pan in most Rangers
It is NOT grounded when oil level is OK
And Grounded when oil level is low
There is a delay circuit in the cab, like the anti-slosh module for the fuel gauge, it prevents Low Oil level light from coming on when cornering and oil moves to one side of the pan
Picture of the sensor, removed from oil pan with its wire plugged in, here:
https://therangerstation.com/forums/showthread.php?t=139219
Picture of just the wire and connector here:
https://contentinfo.autozone.com/znetcs/product-info/en/US/wl2/866/image/2/
There is a wire clip in the sensor that holds it in place so that whole black tube slides out, and no it can not leak with that connector unplugged.
So unplug it and then see if oil level light still comes and goes, if not then sensor is bad, if it still comes on then wire or the module is bad, grounding out somewhere