I have a westie (terrier) and I really want to buy a rat, I

  But do you think there might be a chance my dog won't go wild?
I'd say that it's possible that the dog won't go wild. I've seen pictures of Great Danes with baby chicks, so it's possible to train your dog to be gentle with anything. You'll have to slowly introduce them to each other by keeping the rat in a cage and setting the cage in front of the dog.
It is a very bad idea. Why would you even consider it?! The dog has centuries of bred instincts to kill little animals like mice. To try to train the dog no to go after the little animal, would be like trying to train a person not to feel thirsty after walking in a desert for 4 yours. It's a nature instinct and need.
Westies are "hard wired" to hunt vermin. Not a good idea.