Not through the standard game options, no. You would need a mod to do it.
Sims gender is set during character creation and the base game gives you no way to alter it afterwards. Community-made mods exist that add the capability, and they generally work by editing the character data directly.
Mods come with the usual caveats: they can conflict with official patches, occasionally corrupt saves, and are unsupported if you later need to contact the publisher about a bug. Back up your saves before installing anything.