Someone who is sterilized with just cause, it is my understanding, is free to marry if he or she isn’t impotent. A woman who has a hysterectomy because she has uterine cancer, or her ovaries removed because of cancer, is, to my understanding, still free to marry.
I have actually known Catholic women who have validly married who have had these surgeries for legitimate medical reasons.
Similarly, if a man were to receive medical treatment that incidentally rendered him infertile, but not impotent, it is my understanding that he could still marry.
I don’t know what would happen to someone made sterile for the purposes of avoiding procreation, i.e., a man who voluntarily received a vasectomy strictly to avoid procreation.
The canons don’t seem to suggest any differentiation between natural sterility and sterility imposed by human action.