Is it permissible for a woman who has become pure before the end of forty days of confinement to perform different acts of worship? and is it lawful for her husband to have sex with her?
Once postpartum bleeding ceases and she is certain that it won`t happen again, she becomes pure, and so she should perform Ghusl (ritual bath), pray, and fast. She can also have sex with her husband even before the end of (40) days because the minimum of postpartum bleeding is a moment, and the maximum is (60) days. However, the postpartum bleeding for the majority of women is (40) days, but this does not apply to rest of them.
Is it a condition that a woman should untie her locks while making Ghusl (ritual bath)?
Ghusl from Janabah (ritual impurity), or menstruation obligates that water reaches the roots of the hair in order for the Ghusl to be valid, but if it doesn`t, then hair locks must be untied for water to reach them, and for Ghusl to become valid.
Is it permissible for a wife to leave her house without asking her husband?
It is impermissible for the wife to leave her house without asking her husband except for a sound reason.
What is the ruling on one who performs ablution or the ritual bath while having nail polish?
Nail polish must be removed before ablution or ritual bath so that water reaches what is beneath it, because it is a barrier that prevents water from reaching that area. This is based on the hadith narrated by Ali (may Allah be pleased with him) from the Prophet (peace be upon him): "Whoever leaves a hair's breadth of his body unwashed from major impurity, such and such will be done to him in the Fire." (Reported by al-Bukhari). And Allah the Almighty knows best.