Yes, I had this experience for years. I thought I was being helpful when thru counseling I learned that I was being co-dependent. You understand more than I did. I wasn't even aware that I needed to have boundaries. Boundaries? What are those? Took me years just to understand that.
I read a book with Co-dependent in the title and that helped me a lot. I'll try to remember the author and add her name to this post.
I suggest that you focus on defining your boundaries based on the ways people have taken advantage of you in the past. I do a lot of journaling or writing as a way of clarifying issues for myself. You might start with a list of people/events that you felt hurt over and try to figure out what they all have in common and where it would have been reasonable to say no if you had confidence in your ability to say no.
Also make a list of what you wish for yourself. For me, after a year or so I realized that I wanted people to love/like me and when I kept trying to "help" them I was thinking that they would at least like me for what I did. I thought that I was being selfless but in reality I expected appreciation, which felt like being loved or liked, in return. And so I was hurt when they just kept taking without giving back in the ways I identified with being liked. For example when I asked for help they said no.
I learned this way of living by earning praise and love from my parents by helping them. My growing up was in one of those families in which the daughter became the mother. My mother was ill much of the time and both of my parents relied on me to take up the slack.
Also, practice saying no, in your mind and say no every chance you get. Practice different ways of phrasing no until you find a way of saying it with which you're comfortable. One that I like is, "I'd really like to do that for you but I'm already overwhelmed with my own stuff." Both are true. Or you can say, "I'll do x,y,or z. I only have time for one thing." or "My schedule is crammed full right now. I'm sorry." As you're saying these words focus on your own life and what you need to do for yourself and your family. And accept that you won't feel comfortable at the beginning. I like the phrase, "fake it until you make it."
My Dad didn't know how to say no either and we always felt that other people, frequently strangers, were more important than us, his family. That was not true. However, what was true is that pleasing other people was a higher priority than pleasing us. He trusted that we would continue to love him and he craved the praise of others.
Prioritizing your time and energy every day will help you know when to say no. Focus on your goals for yourself and family. Define the boundaries you need to meet those goals. Counseling can help you figure out why you're stuck in this self-sabotaging cycle which will then make setting clear goals easier.
You can find a way to feel comfortable saying no. The journey to there is worth it.