There are circuits and you could do it. But you really need a grasp of electronics and mains safety requirements - if you knew about these you wouldn't be asking the question. And buying one is cheap enough.
By the way, they don't use rheostats - went out when the thyristor was invented.