It shouldn't actually be to hard good sir.
In theory, all you have to do is have multiple heroes with the same base attributes, names, etc. and have them each with different ability sets learnable. Then, set a trigger to allow you to change on hero for the next while keeping his spells (I'm assuming you can find a way to save the spells or duplicate them before the hero is deleted or something, I'm not too Trigger savvy).
This method would ensure that the abilities that are add to the hero aren't learned yet, the only thing I'm not sure about is retaining the old abilities.
However, if you could figure out a way to make the changed hero an alternate form (like metamorphosis or something, just permanent) I'm sure the multi-versions-of-the-heroes idea will work. It would be similar to how you can add normal abilities to an alternate form, it's just it's a hero ability and not learned by default.