Rats are not capable of vomiting. Neither can they burp, or belch. And can experience heartburn neither. Some of the reasons they can’t vomit are: They have a powerful barrier between the esophagus and the stomach and lack the esophageal muscle strength to overcome and open this barrier by force, which is essential for throwing up.
This is basically why rat poison works (the newer versions cannot harm humans, cats, dogs and other pets that can vomit). When a rat ingests rat poison, such as Red Squill, the poison cannot come out of their system as it gets absorbed leading to the death of these rodents.
They do have other defensive mechanisms, however. One is their extra sensitive food-avoidance learning. When a rat discovers a new food, it tastes just a little of it and if it makes them ill the rat will avoid it like the plague in future, through the acute sense of taste and smell.