The Messenger of Allah ﷺ said, "Any woman who has applied perfume should not attend the night prayer with us."
قال رسول الله ﷺ: أيما امرأة أصابت بخورا فلا تشهد معنا العشاء الآخرة.
Muslim narrated it in "The Prayer" (444) through various routes from Abdullah bin Muhammad bin Abdullah bin Abu Farwa, from Yazid bin Khusayfa, from Busr bin Saeed, from Abu Hurairah, and he related it.His saying, "then let her not attend the last night prayer with us," is because temptation is stronger at that time, otherwise the warning applies to all times.As for what was narrated from the freed slave of Ibn Abu Rahm, who heard it from Abu Hurairah, tracing it back to the Prophet ﷺ, Abu Hurairah once met a perfumed woman and said, "Where are you going, servant of the Almighty?" She said, "To the masjid." He said, "Did you perfume yourself for it?" She said, "Yes."Abu Hurairah said, "Any woman who leaves her house perfumed intending to go to the masjid, Allah will not accept a prayer from her until she returns and washes it off as she would wash from janaba." Its chain of transmission is daif.Abu Dawud (4174), Ibn Majah (4002), and Ahmad (7356) all narrated it through Asim bin Ubaydullah bin Asim bin Umar bin Khattab, from the freed slave of Ibn Abu Rahm, and he related it.Asim bin Ubaydullah is daif by the agreement of the scholars, and the freed slave of Ibn Abu Rahm, or the freed slave of Abu Rahm, is Ubayd bin Abu Ubayd Madani, whom no one has affirmed as reliable. Ibn Hibban and Ajli merely mentioned him among the trustworthy narrators, and both of them are known to be lenient in matters of reliability, as is well known.The hadith also has other chains of transmission that are flawed.