Our Graysee has had both. The reverse sneezing is just that: it's like they're taking air INTO their lungs forcefully, rather than pushing it OUT! Graysee gets it when she gets excited, typically.
The hairball thing is also accurate; unless your Yorkie NEVER licks the floor, or the carpet/rug, he/she is going to lap up some hair, as they ALL shed a LITTLE bit, especially when they shake. And, unless you vacuum the house 2-3 times a day, you're going to have some dog hair, as well as people hair, lying around here and there. Once they get that hair in their throats, it's just like if you or I had done so; they want to GET IT OUT! And it is hacking, gagging, whatever you want to call it, until they feel that they've removed the offender from their throat.