Yes a prescription from your doctor is needed to buy sterile water.
It's kind of weird though that you need a prescription because it's just water that has been sterilized but it goes through a good sterilization process and it gets confirmed that it's sterilized so that's why sterilized or sterile water requires a prescription for purchasing it.
Sterile Water is pretty easy to get a prescription for though so you can usually easily get your doctor to prescribe the sterile water for you.