It just happens sometimes and isn't a big concern.
If you have trouble getting it to go away or it recurs, I would consider a bile acid test for liver function. Liver problems are very common in Yorkies and bladder issues can be secondary to it. If she is in that much pain, I'd be a bit concerned that stones may be present. She should be just fine though.