My mother had cancer, had surgery, they thought they got it all, but weren’t sure, then she went through chemo, and she was fine, and in extremely good health with lots of energy (she even made a trip to Greece, a trip to Hawaii, and a trip to California from Maine), for four years, but she suffered a recurrence, and was told that it was doubtful chemo would help this time; it was scheduled anyway. She went into a steep decline, and could not eat. She essentially starved to death. Her decline lasted only about nine weeks.
So, taking a little license, and making the protagonist younger than my 77 year old mother, you could make the character a cancer survivor, but mention that recurrence was a risk. Have him go in for periodic tests, which would come out clear, until about 3/4 of the way through your story, then show, some “inflammation,” which “could be an infection,” and it was “wait and see,” because “chemo wouldn’t help a second time.” The tests could get more and more ominous, then, when it was convenient for him to weaken just a little, you could have him vomit a couple of times, but have the other characters reassure him that something they ate the night before was a little off, and they all felt kind of queasy. Then, he’d stop eating, but hide it from the other characters, and he could keep going for a few days-- say, through a trial, if this were some kind of story where he helped capture a bad guy, and the “fourth act” is the bad guy’s trial. The trial ends, and the protagonist collapses. He goes to the hospital, where it’s revealed that he has cancer which is metastatic, and is preventing him from eating, so he has weeks, at the most, if they keep him hydrated through an IV. He chooses not to be hydrated, so as not to prolong things, and dies in days.
The end.
Would that work?