I had gall bladder surgery when DD3 was 9m (had had a week long stay with pancreatitis when she was 6m too and a few short trips for panc. in the meantime).
I had to stay in overnight as a) I have epilepsy so GA are more problematic and b) they 'lost' a gall stone while removing the gall bladder. I expressed when I came round from the GA and that was sent home with DH when he went home later (I had a tiny stockpile at home for DD3). I expressed during the night and in the morning too when DD3 came in for another feed.
Unfortunately I ended up with pancreatitis again after I was discharged (lost gall stone blocked off the bile duct and my pancreas started digesting it's self again) so ended back in hospital on a side ward of A&E for about 4 days so DD3 was only allowed for visits rather than staying. She couldn't have formula either as she had a bad reaction to it from the first hospital stay so managed on minimal feeds.
Have you tried spoon feeding or syringe feeding breastmilk? Not ideal but if push comes to shove certainly better then her getting dehydrated. You could also have baby waiting in the day room/cafeteria/walking the grounds while you have the op so that you can feed on your return to consciousness. Be aware though that they fill your abdomen with gas while they do the keyhole surgery so you will feel very tender - baby feeding from over your shoulder may help (i.e. baby's feet/legs by your head with her body on your shoulder) so she isn't putting pressure on your sore tummy/chest.
There are lots of painkillers that are compatible with bfing - I had IV morphine, oramorphine , diclofenac (strong version of ibuprofen), IV paracetamol, buscopan [anti-spasmodic which helps the gut], and if I wasn't troubled by their side effects I could have had tramadol and codeine too (though prob not all at once!).
If you have a complicated medical history or are currently on medication you could try contacting the Drugs in Breastmilk helpline for a list of pain meds that could be prescribed to you (the ones I mentioned may be compatible with bfing but they may not be compatible with you IYSWIM!).
You can also ask to speak to the anaesthetist before the surgery (I know I have always seen one before but I don't know if that is common practice or just because I am awkward!) so request bfing compatible anaesthesia (ask for whatever they give a c-section mother).
Good luck with the surgery and I hope all goes smoothly.