A dictator is just someone with absolute power. How he got the power is orthogonal. He doesn’t have to gain power through insurrection or a revolution, he can gain it inside a democratic system. In fact in Ancient Rome, where the term comes from, the Dictator was appointed by congress in times of crisis.