A dictatorship could conceivably alter the law such that whatever he/she does is not illegal, possibly even chinging the laws as he/she goes. If you're a dictator, changing the law need not be a long and difficult process.
I'll grant that in practice it is very difficult to have rule of law without democracy. It is interesting to think about as a "gedankenexperiment" though. :)
The example of dictatorship with a rule of law is Singapore under Lee Kuan Yew.
Re:A Cyberattack 'the World Isn’t Ready For'
by pbhjpbhj on Friday June 23, 2017 @06:59AM
(#14618249)
In what way is he dictator if he can be challenged and defeated in the courts? FWIW the Wikipedia page, on cursory view, only refers to him as part of political parties and having been elected: perhaps you can flesh it out a bit for someone not familiar with Singaporean history, thanks.
His party is a ruling party of Singapore since before independence, until 80s it won all seats in parliament. He was a prime minister for 30 years, current prime minister is his son.
Lee Kuan Yew was a benevolent dictator, except for his political opponents. Dictatorship is a spectrum :)
Meanwhile, in a democracy, I can see you could have group not under the rule of law _iff_ any actions they take do not impact anyone who is going by the law, including an impact such as "gives an advantage or benefit to those under the law can't get". Otherwise the government whilst possibly being "by the people" would no longer be "for the people" but instead "for the preferred classes".
You could maybe finagle something that some people could do, that was illegal for others, but doesn't give the first group any benefit. But I don't think you can practically; so practically then democracy would be predicated on rule of law even if not technically required.