@fify-- I'm not an expert and you should always consult with a doctor if you have any health issues and go by their suggestions and recommendations foremost.
However, I had melanoma several years ago. The lesions were not on my eyelid, but as far as I know, cancerous skin lesions on the eyelid and elsewhere on the body show similar characteristics.
First of all, cancerous lesions grow at a rapid rate and they are persistent. So they will not go away with hot compresses or eye drops. They can have purplish or reddish color combinations, but I don't know if that can be generalized for all.
Aside from these though, the only way to know for sure is through a biopsy like you said. If you or someone you know has an eyelid lesion that won't go away with treatment and is growing, you need to have it checked out as soon as possible. The sooner cancerous lesions are diagnosed, the better because they can spread to other parts of the body.