I did have surgery under general anesthesia twice while BFing DS.....both my OB and our local center for infant feeding said that absolutely, as soon as I was alert enough to breastfeed, it was okay to breastfeed. There tends to be a lot of misinformation out there about it, and sometimes because a doctor doesn't know, they'll tell a woman not to breastfeed after even though there is no good reason not to.
One thing I can say is that after my second surgery, probably in part because I was stressed about it (I was having an IUD that had punctured my uterus removed laparoscopically), my milk supply temporarily dropped down to almost nothing for the next week. I kind of panicked but trusted that I could get that supply back up-and within a week was back to where I'd been before. If this happens to you, don't be alarmed because you can rebuild back up if your milk supply has a wonky reaction to surgery. I used every supply building tip in the book like Fenugreek, oatmeal, etc., and tried to be really patient and relaxed with DS on the breast because it was taking twice as long for my milk to let down. But it did all come back just like it was.