Here are some points from the Catechism:
962 “We believe in the communion of all the faithful of Christ, those who are pilgrims on earth, the dead who are being purified, and the blessed in heaven, all together forming one Church; and we believe that in this communion, the merciful love of God and his saints is always [attentive] to our prayers”
1032 This teaching is also based on the practice of prayer for the dead, already mentioned in Sacred Scripture: "Therefore [Judas Maccabeus] made atonement for the dead, that they might be delivered from their sin."609 From the beginning the Church has honored the memory of the dead and offered prayers in suffrage for them, above all the Eucharistic sacrifice, so that,** thus purified, they may attain the beatific vision of God.**610 The Church also commends almsgiving, indulgences, and works of penance undertaken on behalf of the dead:
The Church does not address the issue in terms of believers or non-believers, just that we pray for the dead. We pray for the dead because we believe that the prayers help them in the process of purification. Most protestants believe that a soul who dies in God’s grace makes a bee line for heaven. Catholics agree that those who are saved go to heaven, but we have always believed that there is a final purification before entering the beatific vision. This is called purgatory. We pray for souls because we want to help them receive all the graces they need to be fully purified (consider it a dry clean for our white garment given at baptism). However, it is important to note, we believe that the purifying grace of purgatory was won by Jesus Christ on the cross AND that this is only for those who are “saved”. We just believe that God gives us salvific graces through various ways in a life long process and purgatory is the final shot of grace which rids us of any sin we clung to at the time of our death. Some protestants have been very misinformed on what we believe purgatory to be.
In terms of agnostic, atheist, life long Hindu, or whatever, we have no idea what happens in the final moments of their lives. We are not the judge and cannot know for sure who is saved. Some that we might think were saved, were condemned and vice versa. Only God truly knows the heart. This is true of your wife’s uncle and I pray the Lord’s mercy on his soul and that he did come to faith in Jesus in his final moments.