First off you breed a Cleffa that learns Wish in Gen III.
You then teach that Double-Edge through the Move tutor in FR/LG.
Transfer that Cleffa over to a Gen IV game. Evolve it. Once it evolves there will be a chance (50% if I remember right, although I can't find a source to back trhat percent up) that its Cute Charm ability will change to Magic Guard.
The only way a Pokémon can change its Ability is upon evolution. The "slot" storage system means that if an unevolved Pokémon has the "first" ability for its species, it will have the "first" ability of its evolved species upon reaching this stage, even if this Ability differs in the evolved species. In other words, a Poochyena with Run Away would evolve into a Mightyena with Intimidate, while a Poochyena with Quick Feet would evolve into a Mightyena with Quick Feet. If the unevolved Pokémon has only one Ability, but its evolution may have one of two Abilities, then it has a 50% chance of acquiring either Ability (dependent on its personality value).
When Abilities were introduced in Generation III, some Pokémon only had one possible Ability. A number of these species were given a second Ability in Generation IV; upon transfer forward with Pal Park, a Pokémon affected by this change will keep its Generation III Ability unless it evolves, in which case the Ability will be recalculated.