No, that is not right.
If you are in a state of mortal sin, you should go to the Sacrament of Confession before receiving ANY other Sacrament, including Anointing of the Sick. If you are too sick to make a Confession (say unconcious or on deathbed), then Anointing covers forgiveness of your sins. Otherwise, you need to go to Confession first.
If you are in a state of venial sin, your sins are forgiven through Mass.