I'm a long-time big-time faster, so can field your fasting questions...
You should wait until your body is fully recovered from a fast and digestion is completely reestablished before flushing. This can take from a week to months, depending on the duration of the fast! For example, a ten day fast will take 7-10 days.
I would say the same is true of surgery or anything strenuous for the body. It is definitely a good idea to go into surgery clean, but make sure you are fully recovered from the fast!
Hope both the flush and the surgery go well! Keep in touch!