I hope we’re clear here: a vasectomy is grave matter, but it’s a single sin. If a man has a vasectomy and confesses it in true contrition, he does not need to worry about his state of grace, going forward. It is not a moral necessity to reverse a vasectomy.
Does the Catechism say that it is not a moral necessity?
This would vary with each individual circumstance. There is such a thing as having an obligation to right something that has been wronged through sin. Vasectomy reversals are painful (but not as painful as eternity in hell, and keep in mind the vasectomy itself was no day at the beach, and I’d bet nobody complained too much about
that! —
“ouch! - maybe I should have kept myself fertile”, said few if any men ever, bearing in mind a future of sex on demand without consequences), more difficult to do than the vasectomy itself, are not cheap, and might not be covered by insurance. In the end, this would be between the man and his confessor. Some confessors prescribe a period of penance, and I have heard of couples being asked/invited/told to practice the same kind of abstinence they would practice if they were using NFP. Or perhaps living with the knowledge that the man has ruined his fertility would be penance enough. There is no “one size fits all”. Again, at that point, it’s between penitent and confessor.
The same would hold true for a woman who has her tubes tied, though reversal would be a more serious operation, in that it involves going into the body cavity, whereas a vasectomy doesn’t.
Keep in mind, too, that aside from any penance imposed or not imposed, any obligation to have a reversal or not, the person who has had a vasectomy or tubal ligation has created their very own, ongoing, personal occasion of sin, by having to resist the temptation to say to themselves “boy, I sure am glad I can perform this sex act without having to fear pregnancy, that sterilization has made my life
so much easier!”. Yet one more temptation to resist, that wouldn’t have existed if they hadn’t done it. Sin has so many “downstream consequences” that people don’t always consider.