I have a painful lump in the right hand side of my scrotum since 4 days. It is near one of my testicles. Is this a sign of testicular cancer?

Possibly. A minority of testicular cancer patients present with acutely painful scrotal masses, but the symptoms you are describing warrant further investigation. Your doctor should perform a physical examination. Depending on his findings, he may want to order an ultrasound or some other tests.
Pain. That is not the usually presentation for cancer. More commonly is epidimal torsion. You should see a board certified urologist.