Is it permitted for a woman to make ziyara of a nabi or wali during her menses?
The answer is — and Allah knows best — that if the grave is in a cemetery such as Nabiyyullah Dhul Kifl (as) and Sayyidina Arslan al-Dimashqi in Damascus, it is permitted for her. But if the grave is inside a mosque such as our Prophet (saws) or Nabiyyullah Yahya (as) in Damascus, it is not permitted. She may still, however, pass through to fetch something or someone.
Hajj Gibril Haddad