Depending on how you feel, I can't help thinking it'd be easier on him if you ease off from now so he's more or less forgotten by the time the surgery comes up. If you leave it much longer, you may find you need to rush weaning and that'll just be stressful for everyone. Also he'll be a bit confused by you being away (in hospital) and I think having him miss BFing at the same time would be incredibly hard for him and whoever's looking after him.
HTH and very best of luck with the surgery.