The Holy Quran says: “Whoever intentionally changes the will of a deceased person, he has committed a sin. God is All-hearing and All-knowing.” (Verse 181 of Surah Al-Baqarah)
Imam Baqir (AS) said: “Implement the will of (the deceased) even if he is non-Muslim.” (Of course, it is obvious that if implementing someone’s will would weaken Islam or strengthen the front of Kufr, a Muslim should not implement it.)
From the viewpoint of Islamic Fiqh, if changing someone's will causes harm to other people’s rights, he should pay for it out of his own money and carry out the deceased’s will. (Nemuneh Exegesis of the Quran)