Is it absolutely essential to see a doctor if my erection lasts for hours?

Yes. If you have erection that lasts for more than 4 hours, you need to see a urologist or go the local emergency room. This is called priapism and can lead to future erectile dysfunction and penile curvature. This should be handled very quickly to prevent future complications with erections and penile scarring.