Ranking tumors from most malignant to most benign
Most classification algorithms actually provide continuous scores that are compared to a given threshold to give a binary output. Using that score directly give you a ranking. But unless you give us a specific algorithm, it would be difficult to help you further.  

You usually can find that trough the performance metrics. AUC for exemple, has a general definition obtained by varying the above mentionned threshold. However, it has a more natural interpretation (and way faster approximation) when you use a definition based on individual scores.

Some models can even be calibrated in probabilities. That means, under some conditions, the continuous score can be intepreted as a probability to be of a given class.