If one is in a state of mortal sin, no. Mortal sin is normatively forgiven in the sacrament of confession. If one is in a state of venial sin, yes, because one can be forgiven venial sin through the Eucharist. Although confession is not required for the forgiveness of venial sin, the Church does strongly recommend confessing venial sins. As for the anointing of the sick, unless someone is on his deathbed and physically incapable of going to confession, he should confess before receiving the anointing.