Teelynn, you can ask God for forgiveness for your loved one, but the sinner himself must have contrition in order to be forgiven. But don’t think that it is “too late” to pray if the person has already died. God’s mercy is not constrained by our concept of time. God in His mercy, knowing that you would be praying for your loved one (even after his or her death), may have given your loved one the grace to repent before the moment of death.
Also, if a priest is present, even if the sick person is unable to confess, the Anointing of the Sick obtains forgiveness for a person who has sorrow for sin, even if he is unable to verbalize his sorrow or make a verbal confession. (The person must confess if he is conscious and able to do so.)