First of all, not knowing the specifics of your situation, I find it hard to know whether or not your response was appropriate or not. I tend to think it was.
In general, and from a how-we-use-language point of view, interactions of the sort you describe have the potential to elicit defensiveness and rancor. They also have the potential to elicit openness and more satisfying communication in the workplace.
I have a sort of "rule" regarding interactions with people who are being difficult (tiresomely and unreasonably persistent or badgering). It has three prongs, and in acronym form they are O-A-F:
Begin with observable facts as you see them through your eyes, and then convey your observations in a neutral tone of voice if possible. Simple facts--in theory at least--tend to defuse the kind of defensiveness that might make it difficult for your coworker to listen to what you have to say. Saying "Your importunity is driving me crazy!" may be factual from your point of view, but it will almost certainly trigger defensiveness and a possible counterattack.
Statements preceded by the word you and your tend to do this, and they short-circuit the listening process by triggering counterproductive emotions in the person being addressed. Statements preceded by I or "I have noticed," on the other hand, tend not to do this. Your "I'm sorry" and "I think" are steps in the right direction, so kudos to you. Here's a--perhaps--more helpful approach:
"I've noticed that you've been asking me to do X a number of times now--at least three or four times by my last count."
One reaction to your observation might be, "Gee, I didn't realize I'd asked you that many times to do X." You might then soften the situation by saying, "Well, I may be exaggerating a little bit, but I'm pretty sure it was more than once." As in most "bargaining," one person gives a little and the other person gives a little. Fair enough? OK. If the path is clear at this point, move on to the A in O-A-F.
Assess how you perceive the situation you have described in your observations. Be sure to include one or more carefully chosen words that convey accurately how you perceive things from your perspective. Your mini-goal at this point is to link the facts in step one to the effects in step two. For example:
"I interpret this persistence as inappropriate, since my previous answers have consistently been 'No, I cannot do X.'"
You are leaving open the possibility that you could be wrong, and your coworker may disagree with your use of the word inappropriate. That's OK, however. Keep your cool. Instead of saying, "How could you possibly interpret your behavior as anything else but inappropriate?" say this: "OK. Interesting point. May I ask you a question? How would you describe it?" Again, stay neutral in your tone of voice.
At this point you may learn something about your coworker that you never knew before. Perhaps she will say, "I'd call my behavior persistent, but I didn't mean for it to be inappropriate. I've always done things this way. That's the way I was brought up: to be persistent."
At this point, you are perhaps safe to move on to feelings, which you may still think are legitimate.
Finish up with how her persistence makes you feel. As difficult as it may be, finishing with feelings may not be the natural thing to do, but it is usually more effective than leading with feelings. Even at this stage, neutrality in your tone of voice probably works best.
Your emotions and feelings are yours, and you have every right to give voice to them. Saving the emotional component until last is kind of like the punchline in a joke: it encourages better listening on the part of your coworker because she is waiting for the punchline. A good "feelings" statement might go:
"From my point of view, I can't help but feel that kind of persistence is really inappropriate. Not only that, it makes me feel uncomfortable and, frankly, irritated. Can you see how I might feel this way?"
Your question then puts the ball in her court, and if things have gone well up to this point, you may have opened the door for a heart-to-heart conversation that clears the air, sets up some appropriate boundaries, and lays the foundation for a better relationship between you.
The O-A-F approach is not instinctive for most of us, myself included. It takes practice, persistence(!), and a little assertiveness, but it is a useful skill that will set you apart from other coworkers who lead with emotions and trigger only defensiveness and lingering hard feelings . A more clearly neutral approach often succeeds in opening people up to seeing things from someone else's perspective, and that's what good communication is about: arriving at an understanding not just of what the words of your interaction mean, but what those words tell you about what it's like to be in the other person's shoes. Yes, meanings are in words; they are also in people.
The OAF method is a way to observe, assess, and feel how those words convey meaning to two people who are not currently seeing eye to eye! O-A-F is not infallible, but it's worked pretty well for me, and perhaps it will for you.
Best wishes to you.