If there is emission of semen, then ghusl is required because of ejaculation, because the Prophet (peace and blessings of Allaah be upon him) said: “Water is for water.” Narrated by Muslim, 343.
But if there is no emission of semen, the scholars differed concerning this matter and there are three opinions:
1 – That ghusl is required of both the man and the woman, regardless of whether the barrier is thick or thin. This is the view of al-Shaafa’i (may Allaah have mercy on him).
If he wraps a piece of cloth around his penis and inserts it until the tip disappears, but does not ejaculate, the correct view is that ghusl is required of both of them, because the rulings have to do with penetration, and this has taken place. End quote.
2 – That ghusl is not required at all. This is the view of the Hanbalis, as stated in al-Insaaf (2/92), because the two parts have not met due to the presence of the barrier.
3 – That if the barrier is so thin that heat and pleasure can be felt, then ghusl is required, otherwise it is not. This is the view of the Maalikis as stated in al-Mawsoo’ah, 11/201.
Ibn ‘Uthaymeen said concerning this third opinion: This is the most likely to be correct, but to be on the safe side ghusl should be done. End quote.
Al-Sharh al-Mumti’, 1/234.