Even in my limited knowledge on Buddhism, it makes sense to see a connection between a terminal illness (like cancer) and previous negative karma.
Everyone who is born dies; and maybe 30% of all deaths are from cancer (other statistically likely terminal illnesses in developed countries include heart attack, stroke, and respiratory diseases).
I think that Buddhists see a connection between dying and being born.
The proposed cure for that (i.e. to prevent it happening again) is to be enlightened (e.g. to attain nirvana, which is also known as a "deathless" state) -- to avoid being born again in future, and avoid or minimize "suffering" in this life.
Note that if a person attains nirvana in this life, their body will (like the Buddha's did) still die eventually.
I think that seeing the effects of kamma (e.g. being able to say "your current life is like this because you did such-and-such in a previous life") is a supernatural (miraculous) power, attributed to the Buddha -- and (I think that) because it's a miraculous power it's not necessarily a sensible thing for an ordinary/unenlightened person to attempt.
If or when someone does have a terminal illness it might be tempting to ask "why me?" and "why now?" and so on, but I don't think I like to attribute it to negative karma -- that seems to me like blaming the victim: "Oh you have cancer? Well that's your fault." I prefer to attribute it to having been born.
Is there a Sutta where Buddha talks about this connection?
I think there are too many to name -- it (the cycle of birth and death) is kind of recurring theme of the Pali canon.
For example in the beginning of the first sutta, where it talks about the first noble truth:
Now this, bhikkhus, is the noble truth of suffering: birth is suffering, aging is suffering, illness is suffering, death is suffering; union with what is displeasing is suffering; separation from what is pleasing is suffering; not to get what one wants is suffering; in brief, the five aggregates subject to clinging are suffering.
Is it true that a terminal illness can be seen in a "positive" way, like purifying past karma?
Yes I think there's opportunity for "spiritual advancement" or whatever you want to call it, opportunities to become a different, better, more enlightened, wiser person.
There's a verse early in the Dhammapada for example,
People, other than the wise, do not realize,
"We in this world must all die,"
(and, not realizing it, continue their quarrels).
The wise realize it
and thereby their quarrels cease.
If someone has terminal illness they might make peace with those around them, even if they hadn't previously.
Illness might furthermore be an opportunity for full-time practice.
To pick another example more or less at random, at time 13:55 of this video Yuttadhammo Bikkhu says that dying of cancer would be an opportunity (a chance) for us to understand the nature of reality.
From a Buddhist prospective, are there specific ways (like rituals, prayers) for curing (or helping with) a terminal illness?
There are many other references at A Buddhist Guide to Death, Dying and Suffering (the author is or was a chaplain at a medical centre).
And What nurses need to know about Buddhist perspectives of end-of-life care and dying (registration required) might be helpful.
Also page 82 of this commentary on the Vinaya describes the words a bikkhu might say during the dying process to inspire a patient.
Another quote I remember isn't from a Buddhist source, but it might be informative if or when you relate with a patient. From Randy Pausch’s Last Lecture,
So, you know, in case there’s anybody who wandered in and doesn’t know the back story, my dad
always taught me that when there’s an elephant in the room, introduce them. If you look at my CAT
scans, there are approximately 10 tumors in my liver, and the doctors told me 3-6 months of good
health left. That was a month ago, so you can do the math. I have some of the best doctors in the
world. Microphone’s not working? Then I’ll just have to talk louder. [Adjusts mic] Is that good? All
right. So that is what it is. We can’t change it, and we just have to decide how we’re going to
respond to that. We cannot change the cards we are dealt, just how we play the hand. If I don’t
seem as depressed or morose as I should be, sorry to disappoint you. [laughter] And I assure you I
am not in denial. It’s not like I’m not aware of what’s going on. My family, my three kids, my wife,
we just decamped. We bought a lovely house in Virginia, and we’re doing that because that’s a
better place for the family to be, down the road. And the other thing is I am in phenomenally good
health right now. I mean it’s the greatest thing of cognitive dissonance you will ever see is the fact
that I am in really good shape. In fact, I am in better shape than most of you. [Randy gets on the
ground and starts doing pushups] [Applause] So anybody who wants to cry or pity me can down and
do a few of those, and then you may pity me. [laughter]
All right, so what we’re not talking about today, we are not talking about cancer, because I spent a
lot of time talking about that and I’m really not interested. If you have any herbal supplements or
remedies, please stay away from me. [laughter]
I fear it's too easy/tempting to say to a patient, "maybe you'll get better" or "you have to really fight this cancer, you can beat it if you want to" or "try this new diet" or something like that. Whereas it might (I don't know, ask an actual expert rather than me) be more helpful for the patient to accept/see reality rather than try to "fight" it and it might help them if you would do that too.