The water always dilutes the concentration of an acid. But, it (acid) should be present in stomach at first.
Acid will be present generated in stomach whenever we feed some food or whenever we get starvation. At that time, drinking water dilutes the acid but, the other case no presence of the acid and therefore, no dilution.
That is why doctors recommend to drink lesser water just before or just after taking meals. But, not at the other times.
The reaction between water and HCL in stomach not very exothermic
There is a protective mucus layer to protect stomach walls from acid