They will probably be all right--I would provide lots of cotton or other very soft, warm bedding for them once it starts getting cold, in case there is a power outage over night. It's unlikely that adult rats will freeze to death so long as they have plenty of insulation...they are pretty hardy.
As long as you check on them a few times a day to be sure that the heater is in good shape, I don't see why it wouldn't work. You might consider having a backup on hand in case something happens to it. If the closet is well-insulated enough, a battery of infrared heat lamps could even do the trick. Cleaning cages regularly should prevent ammonia build-up too.