Doctors in ER would know very little if anything about fasting, so why take their opinion into account?
Water according to thirst is the recommended option while fasting, as any excess water inhibits the elimination of toxins. Insufficient water drinking can also lead to dehydration of course whether eating or fasting, so thirst is usually a reliable guide. It is quite possible that less water (rather than more) will have led to the elimination of your kidney stone.
This link may be of interest to you.................