When you get a Yorkshire Terrier, and you bring it into a home with other pets or when you bring other pets into a home with a Yorkshire Terrier, there are those that will tell you that it's impossible to say what reaction you may get from the dog. It is true that the reaction is somewhat dependent on the dog's personality, however for the most part Yorkshire Terriers do get along well with other pets, in most cases.
For the most part, a female Yorkshire Terrier is the most likely to get along with all other pets in the house. The only true exception to this rule is when she has a litter of puppies. At that time, she is likely to become very protective of her litter, and may show aggression towards other animals.
Males, on the other hand, do not always get along with other pets. They will especially have problems with other male dogs when a female dog is in the home, and they will become highly protective over the females that they mate with.
A male Yorkshire Terrier may also become highly protective of female humans in the home, which can be very sweet, but can also be a big problem in terms of other animals in the household and sometimes in terms of other humans in the household. For example, a male Yorkshire Terrier may get upset with a human male kissing his wife, if the wife is someone that the dog feels protective of.
Your Yorkshire Terrier may get along with other pets just fine, and the ideal situation is to raise the pets from babies together if possible. However, some experts recommend avoiding other pets in the home that are smaller than the Yorkshire Terrier. These dogs inherently hunt and kill vermin that is smaller than them, and they may see any other smaller pet as vermin - whether you consider it vermin or not. For example, a Yorkshire Terrier and a Guinea Pig or Ferret in the same home rarely works out well, and usually ends badly for the Guinea Pig or Ferret.
Again, if you introduce your various pets when they are young, you will have fewer problems. The important thing is to understand the personality of each pet, and how that pet feels about you "in terms of being protective or jealous" and to take in pets accordingly. In the grand scheme of things, if you have two pets that get along together well, this is the best thing for the animals, as they will have a constant companion and playmate.