While it would have been nice of the clerk to point you to the staff restroom, particulary since you were feeling ill, she was not obligated to do so. Nor was her attitude especially helpful.
But if you needed a bathroom "now," then why did you finish trying on the item you were trying on? I'd have gotten myself dressed and gotten to the nearest bathroom, pronto! It's possible that since you didn't, it gave the clerk reason to believe your situation not to be as urgent as you described.
As for "holding" a fitting room, while you use the restroom facilities: There was a line behind you. Who knew how long you would really be gone? It seems unreasonable to think you could have gone to take care of "business" and not have to re-join the line, at the end, when you returned. It's not like having to go back to the sales floor to pull yourself a different size of something.
I'm certainly not saying you weren't ill. But honestly, if you were that ill, finishing the trying on of a garment, and fussing about losing your place in the que, would likely have been the last thing in mind at that moment.
What I would have done (and have done):
Gotten myself back into my clothes, as quickly as possible.
Scooped up the things I knew I wanted.
Taken them to the nearest sales person.
Asked sales person for a restroom.
When told where restroom was, ask sales person to please hold the items...I'll be right back.
Hightailed it to the bathroom.
Return to the store.
Collect items being held.
Return to the fitting-room line to try on anything more that needed trying on.
Proceeded to checkout with items I'd decided to purchase.
(Sickness hits again)
Ask sales clerk to hold items.
Go take care of "business."
Return to store to make purchases.
Get in line behind others who may have arrived while I was gone to the bathroom. (Unless sales person waves me to be next.)
But...that's just me. YMMV