Can naafil prayer or tawaaf be interrupted in order to offer the funeral prayer?.
The Prophet (blessings and peace of Allaah be upon him) said: “When the iqaamah (call immediately preceding the prayer) is given, there should be no prayer except the obligatory prayer.” The apparent meaning is that a naafil prayer cannot be interrupted except for the obligatory prayer, so it should not be interrupted for the funeral prayer, but if the worshipper interrupts it, there's nothing wrong with it, because it is permissible to interrupt a naafil prayer for a valid purpose.
Similarly, the one who is doing a voluntary tawaaf may interrupt his tawaaf in order to offer the funeral prayer, but it is better not to interrupt it. End quote.
And Allaah knows best.