Is it okay to exercise in the heat if I have hypokalemia?

Very risky. Agree you are taking a chance with your heart which could be life threatening.
Heat sweat lo K. Hypokalemia will kill you if it gets too low. Adapting to the heat turns on adrenal mechanisms to keep your sweat Na low (so you don't die of low BP due to salt loss) but sweat K goes up. So when u exercise in heat you lose more K in sweat. Find out why K low and fix that first. See me for second opinion if you do not know caise of low K. Easy to figure out usually. .
Never, never-ever! You lose even more potassium as you sweat in the heat. This can lead to a funky heart rhythm called "torsades des pointes". Withotu intervention, you can die.