Ultrasound won't work as you'd see the walls of the pipe at a certain distance, rather than the end of the piston.
Laser may work if aimed properly, but it's expensive.
How about placing a wheel against the wall of the piston, with an encoder attached to it? This will allow you to see movement in pretty small steps. You may have to add some form of track with teeth to the piston that lock into a sprocket wheel for best accuracy.