Praise be to Allah.
There is nothing wrong with her reciting the du’aa’ narrated from the Prophet (peace and blessings of Allah be upon him) (“Al-salamu ‘alaykum ahl al-diyaar…”) and there is no sin on her, because she is not intending to visit the graves and she has not entered the graveyard, rather she is just passing by unintentionally.