Having a major surgery in a teaching hospital means that someone is going to be taught something. This might mean that your actual surgeon may be doing the surgery in order to qualify for final certification in that form of surgery. Do not fear. The surgeon has observed, participated in, done part of, or done the entire surgical procedure many times before. There are no "first timers" allowed to work alone in teaching hospitals.
There might be gaggles of interns and residents, surgical residents, and maybe even a few medical students, depending on your case and how rare it may be. These will not be traipsing through your room or barging around constantly, but during rounds, each student is supposed to be prepared to summarize your case and your situation when called upon.
But the groups will talk about your case in medical terminology and according to classroom protocols. Some patients feel that they are being talked about as if they are not there, but that is not the case, it is just the way that the teaching is done.
There might be nursing students who need a chance to learn a particular procedure, or see what a patient with your condition needs in terms of nursing care, preoperative care and post operative care. But they are supervised by fully qualified nurses.
Many doctors are going for specialties in medicine, so there might be "trainees" who already have plenty of experience as practicing physicians. There are doctors on fellowships and research grants who might be building credentials or collecting data behind the scenes.
If there is anything that you need to know, it is important to ask. Any hospital patient also needs teaching as well as care.
The benefits of teaching hospitals are that the newer doctors are in touch with the newer techniques, therapies, and knowledge of medicine. But you also have the older doctors who know the practicalities and who will keep everyone's feet on the ground and the focus on providing the best patient care.
If any of the students makes comments or behaves improperly in any way, such behavior is extremely rare, but if even overhearing their casual conversation about your case is upsetting it can be shut down very quickly.
Doctors are well prepared for what they are about to do when surgery is involved. They know your state of health. They have planned the surgery, and discussed it at length. They have done the surgery many times before, and they do not desire or intend to do a poor job at all. You are in good hands in a teaching hospital. As good as in any other hospital.