Is it possible to build something that can measure water and oil in a tank with out being in the tank?
Since water will eventually separate from the oil if the fluid in the tank is kept still, then it is easy to use ultrasonic sensor.

E.g. You have a tank, that has water and oil already separated after some amount of time:  

|          |  
|   water  |  
|__________|  
|          |  
|    oil   |  
|__________|  


In this case You'd clearly see a reflection of sound wave from the conjunction of water and oil. Knowing the speed of sound in the oil and water You can measure the height and finally find the numbers You need.