Cancer is rife in the animal kingdom. For many, the mortality rate is similar to that suffered by humans.

The dogs and cats we share our homes with can get various forms of cancer. Among other things, second-hand cigarette smoke increases the risk.

But wild animals get cancer too. For instance, many Tasmanian devils have devastating facial tumours, which spread from devil to devil upon contact.

Polluted oceans also pose a problem. One population of California sea lions is known to suffer from urogenital cancer, partly as a result of organic pollutants. It causes paralysis and then death.

In Canada's St Lawrence estuary, intestinal cancer is the second most common cause of death for beluga whales: 27% are affected. And despite misleading myths that sharks are cancer-free, it turns out they can get a form of skin cancer called melanoma.

However there are exceptions. A few animals don't seem to get cancer very often, or at all. Understanding why could help us treat it, or even prevent it.

Cancer occurs when a seemingly normal cell spirals out of control. Usually, old or damaged cells are destroyed, but occasionally one will keep reproducing, creating more and more rogue cells. The eventual result is a tumour.

Only about 5% of elephants die from cancer

In theory, this ought to be a simple numbers game. The more cells an organism has and the longer it lives, the more likely it is that one of its cells will succumb to a random cancer-causing mutation.

For instance, taller people are slightly more cancer-prone than shorter people. The same is true of large dogs.

But it turns out not all cells are equally prone to cancer.

Elephants have trillions more cells than us and live a long time, yet they have lower cancer rates. This is called "Peto's paradox", after the scientist Richard Peto, who noticed that cancer prevalence is not correlated with body size.

Only about 5% of elephants die from cancer. This is staggeringly low when you consider that one in five humans will die from the disease.

Part of the explanation came in October 2015. The elephant genome turned out to contain a lot of copies of a known cancer-fighting gene. Known as p53, it is a tumour suppressor. Most mammals have it, including humans, but we only have one copy whereas elephants have 20.

It's easier to make human cells cancerous than bowhead whale cells

The gene does two things, says co-author Vincent Lynch of the University of Chicago in Illinois, US.

First, it stops the cell from proliferating, giving it the time it needs to repair itself. Second, if the cell cannot be fixed the gene prompts it to commit suicide, a process called apoptosis.

In theory, we could create drugs that "mimic what's going on in elephants," says Lynch. One such drug, Nutlin, is being tested at the moment. It protects the p53 protein, ensuring it does not get destroyed and can continue to work.

If elephants rarely get cancer, bowhead whales seem to get even less.

That is surprising, because in theory they should have a high risk of cancer. As well as being one of the largest animals alive, they are also among the longest-lived, sometimes surviving for over 200 years. That means their cells have plenty of opportunities to mutate and become cancerous, but they hardly ever do.

We should be able to implant bowhead whale genes into mice

Vera Gorbunova of the University of Rochester in New York, US, keeps bowhead whale cells in her lab. So far, she has not found a way to make them cancerous. "It's easier to make human cells cancerous than bowhead whale cells. We don't know why."

When scientists combed through the bowhead whale genome in 2015, they discovered mutations that help prevent DNA from being damaged, protecting the whales from cancer.

Secrets to living longer Ageing is not an inevitable fact of life Many animals have already found ways to delay death. Understanding the lives of bowhead whales and naked mole rats might help us all enjoy longer and healthier lives. Read more about the secrets of living to 200 years old.

So far we do not know exactly which genes are involved. But eventually, we should be able to implant bowhead whale genes into mice to see which ones are beneficial, says João Pedro de Magalhães of the University of Liverpool in the UK. "Mouse studies would be ideal to determine if these genes can protect against age-related diseases or even promote longevity."

At the other end of the scale from bowhead whales, smaller animals also demonstrate Peto's paradox. For instance, mice are extremely cancer-prone, even though they live short lives and have far fewer cells than humans.

But not all rodents face this fate. The naked mole rat defies the odds and offers another hope for future cancer treatments.

Naked mole rats look pretty weird: they are wrinkly and hairless, with enormous front teeth.

But they also live for up to 30 years, which is ancient for such a small animal. What's more, they have a natural defence mechanism against cancer. After several decades of observation, no naked mole rat has been observed developing a tumour.

We don't know if any of these treatments will work properly in humans

In 2013, Gorbunova and her colleagues discovered that naked mole rats produce a special molecule that prevents them from developing tumours. It is a thick, sugary substance called hyaluronan, found in the spaces between their cells. Even if the cells mutate, the hyaluronan stops them dividing further, like a gloopy protective glass.

Humans also produce hyaluronan, but our version is subtly different, says Gorbunova. "In naked mole rats it's in a longer form and they make more of it. We are now exploring ways we can regulate production of this molecule to simulate it in humans."

In theory, Gorbunova says a treatment based on this could be on the market within five years. "Hyaluronan is already used clinically, we just need to start using the naked mole rat long-chain version," she says.

This may all sound very promising, but we should not get too excited about preventing cancer just yet. The problem is that we don't know if any of these treatments will work properly in humans.

We don't know what the trade-off is until we try and manipulate the genes

Naked mole rats are very different to us, so we don't know how extra hyaluronan would affect us. There may be a reason we have less, says oncologist David Vail of the University of Wisconsin-Madison, US. Such high levels might prove to be toxic, for example.

The same is true for genetic manipulation. The way our body expresses genes has evolved over hundreds of thousands of years. A gene that helps a naked mole rat fight cancer might cause a whole other disease in humans.

"We don't know what the trade-off is until we try and manipulate the genes," says Vail. "These things that look like magic bullets in one species may be incompatible with life in another species."

This is not a theoretical problem: we know it happens.

A 2002 study genetically engineered mice to have numerous copies of the p53 gene. The change did increase their resistance to cancer, but the mice also aged more rapidly and could not produce offspring at a young age. Some of their internal organs also became significantly smaller.

They may simply have been given too much p53. A 2007 follow-up bred mice with only one extra copy, and they lived longer without the side-effects.

We need to understand the basic biology, otherwise there's no way to intervene when things go wrong

However, Lynch remains cautious about what extra versions of this gene would do to humans. If the extra copies were beneficial, evolution might well have already produced them, he says.

For elephants the extra genes have clearly been advantageous overall, despite any downsides. "We call these things costs in evolutionary biology," says Lynch. "There are no free lunches." It may be that the elephants have evolved ways to overcome these negative impacts – adaptations humans won't have.

Nevertheless, the researchers are pressing ahead. "We need to understand the basic biology, otherwise there's no way to intervene when things go wrong," says Lynch.

Follow Melissa Hogenboom and BBC Earth on Twitter.