A woman among the wives of the Messenger of Allah ﷺ who was experiencing prolonged menstrual bleeding observed itikaf with him. She would see redness and yellowness, and sometimes we would place a basin beneath her while she was praying.
اعتكف مع رسول الله ﷺ امرأة مستحاضة من أزواجه، فكانت ترى الحمرة والصفرة، فربما وضعنا الطشت تحتها وهي تصلي.
Bukhari narrated it in the Book of Itikaf (2037), from Qutayba, who said, Yazid bin Zuray narrated to us, from Khalid (who is Hadhdha), from Ikrima, from Ayesha, who said (and then she mentioned it).This is different from menstruation and postpartum bleeding, for these two do invalidate itikaf, since it is not permissible for a woman in that state to remain in mosques.