It is permissible to offer
a Funeral Prayer inside a cemetery. It is also permissible to offer a Funeral Prayer (Part No. 8; Page No. 393) over the grave of someone who has already been buried. This is based on an authentic narration which states:
A woman who used to sweep the Masjid (mosque) died. The Messenger of Allah (peace be upon him) inquired about her. The people told him that she had died. He asked why they had not informed him. He (peace be upon him) said: Lead me to her grave. They led him to that place and he led Janazah (Funeral) prayer over her and then remarked: Verily, these graves are full of darkness for their dwellers. Verily, the Mighty and Glorious Allah illuminates them for their occupants by reason of my prayer over them.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family and Companions.