There has over the last few years been some really dangerous misinformation flying around social media, to the effect that putting cool water/cold water/standing the dog in cold water/giving them ice is dangerous.
It isn't. If they need to cool down fast, they need to cool down fast. Standing a dog in cold water and putting wet towels on them particularly on their belly/between thighs is a good way of doing that.
For heavy coated dogs make sure the water goes all the way through to the skin, it is doing no good at all if its sat over an insulating layer of fur/trapped air.
Its also safe for dogs to have ice in their water, frozen food dispensing toys, to be sprayed with the hose and play in paddling pools.
The thing to watch out for is water intoxication, which can happen if dogs excessively drink water or consume ice - those dogs you see snapping at the hose and consuming huge quantities of water for example... or dogs given big frozen blocks who crunch through and eat it really quickly rather than licking it.
Water intoxication is NOT a consideration if you think your dog has heat stroke and is already unwell. Get them wet, get them cooling, get them to a vet. Soaked through and in the car in the AC or in front of the blowers and straight to a vet, don't muck about.