No. Generally speaking, the penitent should perform the assigned penance. But neither that particular penance, nor any penance at all, is necessary for the valid absolution of the penitent’s sins. It is a serious doctrinal error to claim that, if the penitent does not accept the assigned penance and resolve to complete it, then this merciful Sacrament of Forgiveness is somehow invalid. “Beware of the leaven of the Pharisees….” (Mt 16:6).
The three parts of the Sacrament of Reconciliation are: 1. contrition, 2. confession (with absolution), 3. satisfaction. These three together are necessary for “the integrity of the sacrament and for the full and perfect remission of sins,” including temporal punishment (Trent, Session 13, chap. 3). However, the principal means of satisfaction for sin in every contrite reception of absolution is the Sacrifice of Christ on the Cross (Trent, Session 6, chap. 7), from which Tree of Life the graces and efficacy of every Sacrament flow. So even if the penitent does not perform the assigned penance, nor any penance at all, he is still forgiven for his sins. Every contrite reception of absolution includes that satisfaction that Christ made for us on the Cross; therefore, every contrite confession includes the third part of the Sacrament, satisfaction.
In addition, the valid absolution of any actual mortal sin always includes satisfaction for the eternal punishment due (Trent, Session 6, chap. 14), apart from the performance of any assigned penance. This satisfaction for eternal punishment is obtained by the penitent’s contrition and confession of his sins, and the absolution of the priest, but its source is the Sacrifice of Christ on the Cross. And this satisfaction for eternal punishment occurs apart from the performance of any assigned penance. Therefore, the part of the Sacrament called satisfaction is not solely or principally found in the acts of assigned penance.
Furthermore, even the temporal punishment that is due for sin is sometimes wholly remitted merely by the devout reception of the Sacrament of Reconciliation, so that any assigned penance is, in some cases, unnecessary even for the remission of the temporal punishment that is always due for sin. For that temporal punishment is sometimes paid in full simply by the devout reception of Confession. The devout reception of any Sacrament always forgives some temporal punishment due for sin. When the Sacrament of Confession is received, if the sins of the penitent are few and venial, it may well be the case that no further temporal punishment remains to be subject to penance. The satisfaction for temporal punishment occurs by the acts of contrition and confession.
In what is unfortunately the more usual case, after a devout reception of Confession, some temporal punishment remains, and therefore the penitent is obliged to perform some penance to make satisfaction for that temporal punishment. If he does not do so, and he dies in a state of grace, then he satisfies that temporal punishment in Purgatory. However, the penitent is free to choose to do either the penance assigned by his confessor, or any penance that he voluntarily chooses as a fitting substitute. Although there is a general obligation to perform the assigned penance, the obligation is not absolute: the penitent can substitute another penance as his own discretion.
But in no case whatsoever does the Sacrament of Confession become invalid merely by the failure, or even the deliberate refusal, of the penitent to perform the particular assigned penance. The sins of the penitent, properly confessed with contrition and absolution, are certainly forgiven, even if much temporal punishment remains without satisfaction of any kind. Such a situation is far from ideal. But the claim that the Sacrament of Reconciliation loses its validity solely by the failure or refusal of the penitent to accept and resolve to perform the assigned penance is a serious doctrinal error, like the errors of the Pharisees. This error is capable of causing grave harm to the spiritual lives of the faithful.