Baby is self weaning from the boob

My 9 month old has drastically cut down her breastfeeding in the past 3 weeks. She nurses about every 3-4 hours during the day and will only do one side. Sometimes she cries when I get her ready to nurse and then she just flat out refuses. My boobs have been getting clogged ducts every couple of days. I’m taking 3 pills of sunflower lecithin a day. Pumping doesn’t get them out, and the only way I’ve gotten them out is having my baby nurse them out, but she doesn’t want to nurse very often so I have a painful clogged duct all day. Should I start giving her formula instead of nursing? I can’t deal with clogged ducts anymore.