This right here is the key, I work in a very hot environment and it only gets worse in the summer, 110*F + on the worst days and 100*F on the best days. We constantly stress the importance of hydrating the day before and we provide cooling vests for use when needed. I wouldn't go that far for golf but cooling towels are a game changer when paired with proper hydration.
As others have said by the time you notice or someone else notices the symptoms of dehydration it's already too late. I make sure to drink a hydration packet the evening before, something like Body Armor or Drip Drop typically, Liquid IV if that's all we have. I'll also have plenty of water and usually a Gatorade during the round, usually the sugar free ones. You also need to be careful about drinking too much water, you don't want to feel like it's sloshing in your stomach because you'll end up feeling sick later from the heat and excess liquid. OP keep in mind that once you have heat related injuries such as heat stroke you can become more susceptible to them in the future. If you are experiencing instances like you describe you really should be getting out of the heat and not pushing through.