Is it necessary to have surgery to diagnose and treat endometriosis? I don't really want surgery and all the risks etc

Nope. If you are okay living with the symptoms and the pain, there is no reason to put yourself through surgery. That is your decision. However, there are instances where the diagnosis might be something else, and you should talk to your doctor/surgeon to clarify that possibility and if there are other harms of not getting an operation.