You will be just fine! Have the surgery when you think is best, don't make your pain worse. I had elbow surgery, terrible pain in hands, was not allowed to play the piano once they decided I needed surgery. After the surgery, I continued teaching with my cast on and then with a sling for many months. It was a vivid reminder to the students of what can happen to you if you do not play the piano correctly. My problems were due to a trapped nerve in my elbow. My piano professor said that is was problem from repetitive incorrect fingering, posture and tension. I believe it. It was also a good thing to learn left handed repertoire!
Dorla