In our region in southern Oman, specifically in the city of Taqah, there is a mosque that they say was built hundreds of years ago. This mosque is surrounded by graves, meaning it is in the middle and the graves are around it. People in our area differ, with some considering it permissible and others considering it forbidden to pray there. Moreover, my grandmother saw in a dream that she entered this mosque..."
Praying in this mosque is valid and and there is reprehensibility in its location so long as no grave exist within it. Besides, Sharia rulings aren't derived out of dreams. And Allah Knows Best.
What is the ruling on praying behind an undesirable Imam?
It is permissible to pray behind an Imam who is undesirable for committing religious violations, and it is disliked for such an Imam to lead the prayer. Still, If he was undesirable for a personal, or a worldly matter, then such argument doesn’t hold water. And Allah Knows Best.
Does the deceased hear the supplications or recitations of those visiting his/her grave? And does making constant supplications for the deceased who didn`t adhere to performing the prescribed prayers ameliorate his/her affliction?
Praise be to Allah the Lord of the Worlds.
In principle, the dead hear the living since it has been rigorously authenticated that the Prophet (PBUH) ordered the bodies of the idolaters slain in the Battle of Badr to be buried. He then approached them and called them one by one and said: "Have you found what your Lord promised to be true for we have found what our Lord promised us to be true." Umar asked him: "O messenger of God! Why do you speak to lifeless bodies?" The Prophet (PBUH) replied: "By the One Who has sent me with the truth! You do not hear my words better than they do except that they cannot respond." [Agreed upon].
However, not all the deceased are in the same situation because Allah The Almighty Knows: "Before them is a Partition till the Day they are raised up." [Al-Mu`minun/100]. Moreover, supplication reaches the deceased. And Allah Knows Best..
I wish to Pray at the Mosque, but I couldn't because I am a Woman. How can I get such a Reward?
All perfect praise be to Allah The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions Abdullah Ibn Masood (May Allah be Pleased with him) reported that the Prophet (PBUH) said: "Her prayer inside her home is better than its courtyard, and her prayer in her own bedroom is better than inside her home." [Abu Dawood]. Her staying at home, and not going to the mosque in obedience to Allah`s injunctions entails a great reward similar to that bestowed on a man for going to the mosque since the Mercy and Blessings of Allah Prevails. And Allah Knows Best.