The requirement for surgery for hemorrhoids depends on how large they are, if they are painful or bleeding. Usually there is no restriction against going to the gym after surgery but it's sensible to give yourself at lest 15 days to recover.
Next Steps
Please visit a general surgeon who can examine you and confirm the diagnosis, whether surgery is needed, and which type of surgery