Many years ago I had a yorkie trained to go in the litter box. Sometimes he'd get in there, other times he'd go next to the box. He'd also go on wee pads.
Thing is, when he'd go on the pad, sometimes just his front paws would be touching the pad. That would account for poops/peeps being discovered next to the pad or box. Maybe that's what's happening??
I recently purchased a Pet Loo for Lucy. It's a raised up box with fake grass on it. Since we're training to outside only, it's an extra aid in the event of foul weather. Lucy seems to only like to sleep on the loo however. She's not using it to potty at all.
Maybe you can try to re-train your pup to use the loo. Your yorkie would have to jump onto it to do his business. He wouldn't be able to just touch the edge and go.
Also, how about working with a trainer???
Good luck! Tracey