If I were using Ancestry.com, I would add a fact to the individual and choose "Custom Event" to create a name change event. I think your options are limited to this plus extensive note-making.
The software package I use allows the creation or multiple sets of parents for an individual, with the type of relationship recorded (adopted, birth, step, fostered, illegitimate and so on), so it's capable of recording the messiness of the lives of real people, to quote @Fortiter. I supplement it with extensive notes, and will be adopting JaneT's suggestion of custom name change events where appropriate.
Unlike @acproctor here, I don't limit myself to recording strict biological descent, but that may be because I'm doing Family History research and he may be doing Genealogy.