Is it permissible to give the reward of an action to someone who offered sacrifices to someone other than Allaah out of ignorance?
Question

                According to what he has been told, his father offered sacrifices to someone other than Allaah. Now he wants to offer charity on his father’s behalf and perform Hajj on his behalf, and he blames his father’s falling into that (sin) on the fact that there were no scholars or teachers to advise him. What is the ruling on all of that?
Praise be to Allah.If his father is known to have been a good and righteous 
          Muslim, he should not believe anything that he is told to the contrary 
          by those who  are not of sound character. It is Sunnah for him 
          to make du’aa’ for him and to give charity on his behalf, unless he 
          knows for sure that his father died in shirk. 
          That knowledge would come about if he has the testimony of two or more 
          sound witnesses who can testify that they saw him offering a sacrifice 
          to someone other than Allaah, such as the occupant of a grave, etc., 
          or heard him calling upon anyone other than Allaah. If that happens, 
          then he should refrain from making du’aa’ for him, and his case rests 
          with Allaah, because the Prophet  
          (peace and blessings of Allaah be upon him) asked his Lord for permission 
          to pray for forgiveness for his mother, and Allaah did not give him 
          permission, although she had died during the Jaahiliyyah as a follower 
          of the religion of the kuffaar. Then he asked his Lord for permission 
          to visit her grave, and He gave him permission. That indicates that 
          whoever dies in shirk, 
          even if he is ignorant, we cannot make du’aa’ for him, or pray for forgiveness 
          for him, or give charity on his behalf, or perform Hajj on his behalf. 
          As for those who die in places which the call of Allaah has not reached, 
          their case rests with Allaah. 
 The correct scholarly view is that they will be tested 
          on the Day of Resurrection; if they obey, they will go to Paradise and 
          if they disobey they will go to Hell, because of the saheeh ahaadeeth 
          which have been narrated describing that.