All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
This woman cannot be ruled to be pregnant unless it is proven that she is pregnant, whether she had used birth control pills, an IUD or any other preservative.
If it turns out that she is pregnant while she is still in bond of marriage with her husband, then in principle the child is attributed to him.
Abu Bakrah narrated that the Prophet said: “The child is for (i.e. traced back to) the owner of the bed (i.e. the legitimate husband).” [Al-Bukhaari and Muslim]
So this child is not denied from him unless he denies him with Li’aan, and there are some Islamic conditions for this.
Al-Bahooti from the Hanbali school, said in Kash-shaaf al-Qinaa’: “Among its conditions, that is to say of denying the child, is that the husband does not acknowledge it, and there is no evidence of such an acknowledgement. In case he acknowledges it, or delays denying it, while he is able to deny it, then his lineage is attributed to him, and its denial is negated.” [End of quote]
On the other hand, it is not obligatory on him to invoke the curse of Allah on his wife in denying the child unless he is certain that the child is not from him; in which case, he must take the initiative to deny it by Li’aan.
For more benefit, please refer to Fatwa 193277, 176757, and 200749.
Abu Hurayrah heard the Prophet saying (when the verse about invoking curses was revealed): “Any woman who brings to her family one who does not belong to it has nothing to do with Allah (i.e. expects no mercy from Allah), ….” [Abu Daawood, An-Nasaa'i and Ibn Maajah]
Of course, all this is when she is still in bond of marriage with her husband, but if he had separated from her and her waiting period ended, then this child is neither traced back to him nor to the fornicator (adulterer), but it is traced back to her. In this case, it is her child; she is obliged to spend on him, and she inherits him and he inherits her.
What this woman did, which is committing Zina (adultery), is a great evil and she must repent for it and beware not to do that again in the future.
For more benefit on the conditions of repentance, please refer to Fatwa 86527.
It is very dangerous for a woman to use contraceptives to prevent pregnancy in order to hide her adultery. This is one of the reasons of corruption. So, she must beware of this, especially with regard to the use of the UID, as this leads to revealing one’s ‘Awrah (parts of the body that must be covered in Islam) without a necessity, and this is forbidden.
Allah knows best.