Have the vet check her out. If she doesn't have a uti and is unable to hold it, there is medication available to help her hold her urine. You may want to confine her to a smaller space at night, too. Has the vet checked her eyes lately to see if she has cataracts? Also, yorkies can suffer from dementia, the same as people. I would have all of these things checked out with a good vet. There are any number of things that can be causing this new problem of hers and perhaps you can find some answers.