Whether it is a sin or not is not clear cut. It depends on a number of factors. I hope the following considerations may enlighten you.
A cure is when reasonable hope exists that a sickness will be healed. A treatment is when there is no certain cure, but the pain may be eased, or symptoms controlled or reduced, or the body may be given a chance to reduce or overcome the sickness.
Cures should always be sought if they exist and are feasible. Treatments, however, depend on if the benefits exceed the suffering they may incur.
Treatments that have reasonable hope to succeed, that the pain it causes will subside after a reasonable period of time, that will significantly remove the patient from danger of death, that will gain for the patient more functionality and autonomy, etc., are treatments that should be sought when feasible.
Treatments, however, that would gain only a few extra days or weeks with significant increase of pain, or would remove the patient from remaining conscious, or treatments that are largely exploratory with no known significant improvement, are considered to be extraordinary and non-obligatory.
Besides, the cost of the treatment may put an otherwise affordable treatment to some, to become extraordinary for those who cannot afford it. Also, the age of the patient may change the consideration: a painful exploratory cancer treatment is extraordinary for a 80-year-old, but quite desirable for a 18-year-old.
For decision as such, the patient should have the freedom and the right to decide. In the occasion where the patient is going to lose his/her competency to make decision, a medical power of attorney who understands the patient’s values should be authorized in a timely fashion in order to safeguard his/her interests.