Recently, I had to open my own washing machine, and it had an interesting mechanical + air chamber based mechanism that I really did not completely understand but worked well to sense 2 level of water level.
You could use the standard CMOS IC's to detect water level and there are multiple circuits on the internet for the same
If you have an assigned which forces you to use ultrasonic, I guess you need make use of a transmitter/receiver and some kind of reflector over the water surface so that you can accurately read the water level.