Reference: Silsilah Fataawa Noor ‘alad-Darb – Tape 2
Question: In reality, I have a confusing matter [for which your guidance is sought]: On this particular day, he awoke just before the fajr prayer and [noticed] he had had a wet dream; and [as] it was a severely cold day, he went off to school for the fajr prayer after having [only] done tayammum. However, on his way to school, he wanted to turn back so he could [go and] have a ghusl (bath or shower), but [for some reason] he did not do that and [instead] continued [making his way] to school. And [later that day] when he returned at [the time of] zhuhr, he still did not have a ghusl. He is now asking for guidance regarding his situation.
Response: As for what has preceded, then he is required to repeat both prayers which he prayed without having had a ghusl due to being in a state of janaabah; that is because he is [not out in the desert, rather] in a built-up area – and as such he [can find the means and] is [thereby] able to heat up the water and have a ghusl.
As for the issue as it is, then when a man awakes and notices he is in a state of janaabah [having had a wet dream or sexual relations with his wife] – then he can do tayammum if he fears [harm from] the cold and does not have anything to heat the water up with; however, if he finds something to heat the water up with, then it becomes obligatory upon him to [heat the water and] have a ghusl. If [on the other hand we] consider that he is travelling out of town, and he has water – but it is cold, and he does not have anything to heat the water up with, then in this situation if he is in a state of janaabah it is permissible to do tayammum. If, he is able to use the water – without it causing him any harm, then it is obligatory upon him to have a ghusl.