I did something somewhat similar - in my campaign, I places a hat of disguise that was based on Alter Self rather than Disguise Self, the idea being that the transformations of your body, gear and the hat were actual physical changes rather than illusions and lasted for as long as the hat was worn. However, there was a ... quirk. If you ever used the hat to change your gender, that gender is what you were stuck with from that point on. A male rogue puts on the hat and uses it to disguise himself as a barmaid in order to evesdrop on a couple of city guards as they chat over dinner. Once he's done, he slips out the back door into the alley, takes off the hat and finds that he's now the female version of the same person he was as a male. One swap per customer, so using the hat to turn into a male won't make the gender-swap 'stick' for the rogue any more. It still functions in its normal capacity, its just that from now on, He is now a She. The effect can't be dispelled, it's not a curse, and even Break Enchantment doesn't do a thing - as far magic is concerned, it's of the oppinion that you've always been that way.
Wish, Limited Wish, Miracle or a savage species Ritual of Change (with no exp cost, as there's no change in ecl, natch) could get you back to the way you were before, but the issue lay in -finding- those measures in the first place.