Sheikh Ahmad al-Khudayrî, professor at al-Imâm University
It is lawful for a Muslim to offer condolences to a non-Muslim when he or she loses a loved one, especially in cases where such an act will be of assistance in calling that person to Islam.
However, phrases containing invocations of Allah's mercy and forgiveness for the deceased should be avoided. Other phrases may be used, such as those expressing sympathy, or calling for patience, guidance, or recovery from grief.
And Allah knows best.
Source: Islam Today