I have a white lump in the middle of the top of my penis. It gets really hard when I have an erection... Could it be harmful?

Sounds lika a cyst. This likely is a sebaceous cyst, but it will not "go away" on its own. See a urologist, who can diagnose and easily remove this under local anesthesia. You may need a referral from your family md, but this should be covered by your insurance if you follow the rules.