In this circumstance the light kit could be connected to a dimmer switch and the fan motor connected to a toggle switch.
Can you put a ceiling fan on a dimmer switch.
An example of this is that the motor in your fan could be damaged and rendered useless.
The new switch does require an additional electrical wire.
By all means you can connect a ceiling fan directly to a dimmer switch but you may run into problems along the way.
You may need an electrician for this.
Replace the wall dimmer switch with an on off switch.
You can install a ceiling fan light dual dimmer switch to operate the fan speed and light intensity from the original wall switch location.
The wall dimmer switch reduces power flow and interferes with the fan control.
You cannot use a dimmer switch on a fan motor but you can find fan speed controllers.