Yes!
I’ll try to explain it on the surgical amputation.
The circumstances: a life is in danger, an infection is spreading. It is good to fight it.
The moral object: well being of a patient, survival.
The intent: to help healing, to perform a surgery in order to address the issue, if there is no other option cutting a limb will remove the source of infection.
What you describe above would not be doing an intrinsically evil thing.
(Also the moral object would be something like “surgical amputation”)
What he meant I think in the question “can a medical purpose justify an act?” – was can a medical purpose justify a directly intrinsically evil act. Or can a medical purpose alone justify an act.
The answer would be no.
One can never do an “intrinsically evil action”.
The ends do not “justify the means”
Catechism:
1753 A good intention (for example, that of helping one’s neighbor) does not make behavior that is intrinsically disordered, such as lying and calumny, good or just. The end does not justify the means. Thus the condemnation of an innocent person cannot be justified as a legitimate means of saving the nation. On the other hand, an added bad intention (such as vainglory) makes an act evil that, in and of itself, can be good (such as almsgiving).39
1754 The circumstances, including the consequences, are secondary elements of a moral act. They contribute to increasing or diminishing the moral goodness or evil of human acts (for example, the amount of a theft). They can also diminish or increase the agent’s responsibility (such as acting out of a fear of death). Circumstances of themselves cannot change the moral quality of acts themselves; they can make neither good nor right an action that is in itself evil.
1755 A morally good act requires the goodness of the object, of the end, and of the circumstances together. An evil end corrupts the action, even if the object is good in itself (such as praying and fasting “in order to be seen by men”).
The object of the choice can by itself vitiate an act in its entirety. There are some concrete acts - such as fornication - that it is always wrong to choose, because choosing them entails a disorder of the will, that is, a moral evil.
1756 It is therefore an error to judge the morality of human acts by considering only the intention that inspires them or the circumstances (environment, social pressure, duress or emergency, etc.) which supply their context. There are acts which, in and of themselves, independently of circumstances and intentions, are always gravely illicit by reason of their object; such as blasphemy and perjury, murder and adultery. One may not do evil so that good may result from it