Well Heatmor can only learn Rain Dance in Generation V but it is not the only Fire type that can learn Rain Dance.
Flareon can learn Rain Dance through TM18 from Generation II to Generation VI.
Moltres can learn Rain Dance through TM18 from Generation II to Generation V.
Entei can learn Rain Dance through TM18 from Generation II to Generation V.
Ho-Oh can learn Rain Dance through TM18 from Generation II to Generation V.
Fennekin, Braixen and Delphox can all learn Rain Dance through TM18 from Generation VI.
Litleo and Pyroar can both learn Rain Dance through TM18 from Generation VI.
Source: http://bulbapedia.bulbagarden.net/wiki/Rain_Dance_(move)
My guess is that Heatmor being able to learn Rain Dance was a error since they changed it so Heatmor can no longer learn Rain Dance in Generation VI.
Flareon probably has been granted the ability to learn Rain Dance because you can teach Eevee Rain Dance through TM18 and if you use a Fire Stone on Eevee it will turn into a Flareon with Rain Dance anyway. So to save the player time they have just given Flareon the ability to learn Rain Dance.
Moltres is one of the Legendary Birds but even with that being said it is surprising that it can learn Rain Dance. It can no longer learn Rain Dance through TM in Generation VI.
Entei is one of the Legendary Beasts but even with that being said it is also surprising that it can learn Rain Dance but then again Suicune can learn Sunny Day and it's a Water type. It can no longer learn Rain Dance through TM in Generation VI.
Ho-Oh is the Master of the Legendary Beasts, so it is possible it is able to learn Rain Dance because each of the Legendary Beasts can and it's counterpart Lugia. It can no longer learn Rain Dance through TM in Generation VI.
Fennekin, Braixen and Delphox is a mystery why it was given the ability to learn Rain Dance. As it is the only one out of each of the three Kalos Starters to be able to learn both Rain Dance and Sunny Day.
Litleo and Pyroar don't get any benefits out of being able to learn Rain Dance as it's Fire type moves get reduced by 50% the same as the others above and it can't learn a Water type move so this is another Pokémon that is a mystery why it can learn Rain Dance.
Note: In Generation I and II every Legendary Pokémon could learn Rain Dance and Sunny Day and in Generation III the only Legendaries that couldn't was Groudon and Kyogre mainly because of their Drought and Drizzle abilities. Although Groudon could learn Sunny Day and Kyogre could learn Rain Dance. This may explain why Moltres, Entei and Ho-Oh have been able to learn Rain Dance for so long because they were introduced in an early Generation as Legendries and all Legendries were able to learn both Rain Dance and Sunny Day.
Hope I helped :)