If a plane had a laser/infrared ruler its four extremities pointing downward, could that work as an altimeter device?
Yes, you could create an altimeter using a laser.  And they exist; See Laser altimetry for aircraft and UAVs by Renishaw as one example.

Laser altimeters, however, have a significant disadvantage over radar altimeters: They can be obscured by weather, like clouds and rain.