I have a Yorkie (as well as other mostly large dog breeds). They are well-known for running away from their masters and hiding, ect. When I first had my dog as a puppy, he didn't even like to be petted by me. He loved strangers though-how frustrating!
The first thing is that you say he is growling. That should never happen in a well trained dog. If its serious pain they will nip or whine, and always take that seriously. IMO dogs understand you well if you overstate your emotions: deep sad sighs, saying "ouch," ect As I said I have several large breed rescues. I would never put up with growling. Most bites to children are actually from small breeds since they are on the level with the child.
My Yorkie hides under the bed sometimes, but if he growled (or barked a lot, that's usually how they establish dominance) at me-and he did when he was a puppy-you have to be willing to take apart the entire bed and bring them out. Usually a broom a works, just be very gentle. Don't swat them! Then sternly tell him "no." If you really put in the effort and it doesn't work, a small percentage of dogs have serious psychiatric problems and you may need professional help. Ask you're vet about that.
That being said. It's good you're giving treats. My suggestion is to give the treats more frequently during the behavior you're trying to reinforce and make sure the dog never gets treats when its not doing something you're not trying reinforce, like looking very cute. In the best of all worlds, all people love their dogs, but we shouldn't give them treats simply because we love them. Sometimes treats are given when the behavior is actually negative, such as "the dog was growling from under bed, so I gave it a treat to make it happy"- that would be a mistake, since it reinforces the negative behavior. Also make sure you are being expressive so that the dog understands. Its ok to use a high pitched voice you wouldn't normally use. "Good dog!" They really like that and they will be more likely to warm up to you. (I actually had to teach my Yorkie the command "Give love" meaning "let me pet you" which sounds silly, but they really are that withdrawn sometimes by nature.)
None of my dogs like their flea and tick medication, but they all get it. A little bit of trickery goes a long way here. Trying pulling out the leash to go for walk. Give them the meds. Give them a treat. Then always, always, always go for the walk. They will figure out if you're lying. I learned that one. If they are especially resistant, you could try an extra special treat, such as cheese, soft food, a new toy, ect. I have a very old Yorkie (about 14 years)-a different Yorkie than the above referenced, I have had several that had a hard time finding homes for many reasons- that will only take his medication in certain brands of low nutritional value soft food, for example.
You could also try getting the oral meds and grinding them up into soft food of course, but I think you need to concentrate on training. I say this since the dog is also sleeping in your bed. In many cases this can cause behavioral issues, so it would be in your interest to teach to the dog to sleep in his crate, outside the door or on the floor, whichever is most comfortable for the dog.