Welcome to YT
 
 
First, that sounds like pancreatitis.
Your pup needs to go to the vet right away and possible get an IV.
Food is pulled for pancreatitis but that wouldn't work with a pup, so did the vet say anything about an IV? 
Yorkies can have 100% human food (several on Yorkie get this), however, there are certain foods they can't have and the meals have to be balanced. 
Ham is way to fatty and salty for dogs and pancreatitis is very dangerous.
You can google it and print that out for your family. 
Bites of egg (especially boiled with no butter or anything) is okay along with a balanced diet.