I think what people mean when they say a country “acts rationally” or doesn’t is that decisions are made that vaguely make sense in when analyzed by applying the rationalism framework to ”the country,” usually used as a shorthand for the populace. But of course, this would only make sense if the leaders decide that the best way to stay in power is to serve the interest of the populace. Which isn’t the case in a non-democratic country.
Rationalism is a framework in international relations, and it makes sense that some terms-of-art will sneak out into informal English. Unfortunately, in English, “irrational” is also, basically, a fancy way of saying somebody makes stupid decisions. And lots of countries that are, broadly, antagonistic toward the US are not representative democracies*. So it seems to have basically morphed into a way of saying that my country’s adversaries are stupid. An unfortunate end for an otherwise interesting term.
* not to say that we haven’t been willing to morally compromise ourselves and ally up with dictators or overthrow democracies.
Dictators are less constrained and longer serving. The latter is particularly damning, since it means the need to save face prevents course corrections.
This is a non-sequitor. There's no reason, a priori, to believe a dictator is any less, or more rational than a popular idiot (and we've elected quite a few of those).
(You also don't stay a dictator for very long by being a madman or an idiot, whereas an elected official usually at least gets to finish their term.)