Prolonged sitting, such as with air travel, puts anyone at risk for deep vein thrombosis (clots in the deep veins of the legs). This can cause potentially serious problems around the time of surgery.
But surgery itself creates a similar risk. As a result, most surgeons will recommend the use of anti-thrombotic precautions such as SCDs (sequential compression devices), which massage the legs during surgery. This is generally recommended for any procedure in adults under general anesthesia where surgery is expected to last for more than 30 minutes. I actually have a standing order for my patients to receive this during any surgery I perform under anesthesia.
As long as a surgeon uses these simple precautions, it's generally no riskier to have surgery the day after travel.
Travel, by the way, will not weaken your immune system. But I remind patients that air travel is mass transportation. This means that one is touching surfaces that everyone else has touched, too. Seat back tray tables, the overhead bin, and the arm rests have all been contaminated, if you will, by any respiratory viruses the passengers before you have deposited there. Wash your hands often, get your sleep, keep your hands away from your face and you should be just fine.
All the best,