Yes, breast surgery has the potential to affect breastfeeding, but not in the way that most people think.
For one, there are many types of breast surgery, with some barely invading the breast tissue at all, and others completely taking it apart and putting it back together. A breast augmentation with an implant, for example, places the implant either between the breast and the muscle, or the muscle and the chest wall. This interferes minimally with any breast structures such as ducts or nerves. Unless the incision is made through or around the nipple, there should be little impact on future ability to breastfeed.
For breastlifts and reductions, however, the procedure is much more invasive. Portions of tissue and skin are removed, and the remaining breast is usually rearranged to some extent. Depending on what parts are removed and/or detached in order to produce the desired shape, this can have a significant impact on breastfeeding potential. There is some evidence, specifically, that techniques that maintain a column of breast tissue right under the nipple, and a wide strip of skin leading to it, may have less of an impact in the long run. This can help to direct surgical strategy, but it only goes so far.
In most cases, women assume that they can breastfeed at baseline. The truth is that there is no way to predict how successful someone will be at this task. There is no test for it, and therefore no way to assess baseline ability. The only way to know for sure is to have a child and give it a try. In some cases, it works, in others it does not, and in others still it may work with only one breast or only for a certain period of time. While it seems sensible that breastfeeding will be impacted by breast surgery, the exact effect is unclear and patient-dependent.
What we do know is that there are many women who have had all types of breast surgery who can successfully breastfeed. This shows that the procedures themselves do not necessarily eliminate this possibility. Breast augmentation appears to have the least impact, and again, the full effect is not determined because we do not have measures of baseline ability. A general way of thinking about it is, if breastfeeding is a priority for you, then weigh that against your desire or need for the procedure itself. If it is important but not crucial, then you may want to go ahead with it, especially since there is a good chance that you will still be able to nurse, if you could to begin with. In the end, this is a very important and very personal decision. Every case is different, every woman has her own priorities, and every breast has its own potential. Thankfully, that potential often endures, for those who seek to use it.