I imagine that if one is being as technical as possible then sex is pretty unambiguous, i.e. egg/female sex cell producing -> female, sperm/male sex cell producing -> male.
Of course that leads to complications when you have to try and generally apply it, which is where the ambiguity comes from.