The Prophet (peace and blessings be upon him) said, “Islam is built upon five pillars: testifying that there is no true god except Allah and that Muhammad is the Messenger of Allah, performing Prayer, paying the Zakah, making the pilgrimage to the Sacred House (Hajj), and fasting the month of Ramadan.” (Al-Bukhari)
A man/woman with bladder problems is allowed to wear diapers, but he has to offer fidyah, according to the opinion adopted by the Hanafi school of Fiqh.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
One with bladder problems may wear diapers during the course of Hajj, should it be considered necessary for them. There is nothing in the authentic sources to indicate that it is unlawful for them to do so while in a state of ihram. Restrictions that are applicable to male pilgrims in this respect do not apply to women, as they are allowed to wear all sewn clothes except gloves and face-veils.
Therefore, a woman is allowed to wear a diaper without breaching any of the rules of ihram applicable to women; hence there is no need for her to offer a fidyah (compensation) for violation.