--------quate---
first thing, lee isnt completly healed he drinks sake and fight drunken fist style because he still got pain and the surgery wasnt done a few hours before they went out it was never mentioned in the manga when they did it the anime just fucked it up like always god damn fucking anime director pieces of shit.
-----------------------
Lee's surgery began in the manga after the genin five left the village, they show us that after Naruto leaves Tsunade turns around to lee and they go together to the hospital. add to that the fact that the crippeled Lee rested in the hospital for a few hours before leaving and still managed to catch up to everybody in time to fight kimimaru, and you reach the conclusion that logically, Lee should have never been there, and nor should the sand ninjas...