If I'd had a teaching job that summer, I suppose technically I could have taught as soon as five to seven days after surgery--one class, two or three days a week. Not eight hours a day, five days a week. (ETA, I wouldn't have been writing on the board, that's for sure.)
I found that I was incredibly tired and sleepy for weeks after my surgery. I had to take long naps every day for about a month (maybe a bit less). I suppose it was a combination of the shock to the body and the aftereffects of anesthesia. If I'd been working, I would have had to sleep more.
I tend to be a bit slow to heal and recover, and I was nearly 47 when I had the surgery. If you are young and strong, you will probably have less of a problem. Still, you might want to just get as much time off as you can. You only get one shot at this.
Do you know how rapidly you heal from major injuries and how your body reacts to anesthesia?