Dive knives come in a range of sizes, shapes and qualities. They often have the words “stainless steel” engraved on the shaft but this more often means “a bit of stainless steel and a lot of good old steel”, the type that rusts quickly.
The more you pay for a knife the higher the quality of the stainless steel and the less likely it is to rust. I have never owned a particularly expensive dive knife so I am well versed in the speed at which the “el cheapo” knives rust. Bear in mind that the more expensive your knife, the more likely you are to take stupid chances – under the influence of nitrogen narcosis – to retrieve it if you drop it while diving… Cheap knives have their advantages!

With a new knife, I start off by washing the knife in very hot water, dry it well and then paint the metal with clear nail varnish. This lasts well and will only need a repaint if you use the knife to actually cut something (imagine that!).

It does help to remove the knife from its sheath and rinse it after every dive, but eventually it will develop some rust. You can gently sand this off, and then repeat the nail polish treatment.
Many dive knives are made out of 440 stainless, the quality of the steel has little to do with price. In fact the cheap stainless that is used for silverware is the least likely to rust, but it will also not hold an edge. Just coat your steel knife in oil or silicone and it will protect the metal from oxidation. Many people think that rinsing it in fresh water will prevent rust for some reason, but any water will cause rust. It is more important to dry the knife off after a dive than to rinse it.