If you catch a pokemon from the Dream World, then evolve it, then the evolved pokemon will have its Dream World ability. For example, if you have a Magikarp with the ability Rattled, and you evolve it, the ability of Gyarados will be Moxie. Same thing goes for the Tepig line. Tepig and Pignite will both have Thick Fat, but if you evolve it into an Emboar, it will have Reckless as its ability.