I heard that, unlike females, male pilgrims wear only two sheets of cloth (Ihram).
Does this mean they are not allowed to wear undergarments to protect their modesty?
I will try be as short as possible.
An-Nawawi may Allaah have mercy upon him said: 'If a person in a state of Ihraam (either for Hajj or 'Umrah) needs to cover his head, or wear any limb-fitting clothes for a sound reason like heat, cold or treatment, then it is permissible for him to cover but he is obliged to slaughter a sheep."
So in short, men are not allowed to wear any extra cloth until or unless a sound reason, even with that reason he need to give FIDYAH which is slaughtering a sheep or fasting 3 days.
For details see this Wearing underwear for necessity during Hajj or 'Umrah