Can I take anti-inflammatory drugs while breastfeeding?

Yes but. Yes, but certain ones are safer than others. Ask your ob. Ibuprofen is the safest of the nsaids (non-steroidal anti-inflammatory drugs).
Yes. Most over-the-counter non-steroidal anti-inflammatory drugs (nsaids) should be avoided during pregnancy, especially during the 3rd trimester, due to increased risk of complications in the newborn. However, nsaids are considered safe during nursing. Some prescription nsaids can be dangerous for the nursing infant. As always, ask your pediatrician.
Yes. Nsaids like Advil (ibuprofen) are safe, so too are drugs such as prednisone. Drugs like methotrexate, however, are unsafe to take when nursing.