It should. I use an outlet dimmer switch, so that I just plug the mat into the modified outlet and then plug the outlet into the wall. It seems to adjust the heat of my mat very well.
It's a short-term solution until you get a thermostat. Yes, it will dial back the matt's output heat but the temperature of the matt will rise and fall with the ambient temperature of the room. If your ambient temperature doesn't fluctuate then it won't be a problem, but in my house it can swing quite a bit, especially in the spring and fall when I'm not running the heat or AC.
Will a lamp dimmer prevent accidental/malfunction of becoming too hot?
Yup no problem using one. As stated though if the ambient temp fluctuates so will the hot spot you are making with that rheostat. So you will need a heat gun to check it. A degree or two fluctuating is no big deal but more then that could be.
OP your question is a bit ambiguous. Do you mean to run a dimmer and a stat? Or a dimmer alone?
I would suggest a stat always, ideally a proportional unit especially with tubs, they don't cause spikes. This said yes a dimmer can be used to restrict the max temp of a mat. This as mentioned is not reliable unless the room temps are absolutely stable as well. If you are interested in using a dimmer with a stat yes that too can work although it is complex as they are sometimes fighting each other.
The better way to increase stat failure protection is to use a low density heat mat. These mats just don't ever reach the stupidly hot temps. Most will not ever get over 100ºF under any circumstances, some have degradation failsafes that trip if they do (and kill the power). Ultratherm is my fav.