With some dimmers it is OK to have both low and line voltage together but you have to use a dimmer rated for the low voltage. Lutron says it is OK but not all brands do.
Lutron says it is OK to mix some incandescent line voltage with electronic low voltage when using one of their electronic low voltage dimmers. At least one other company doesn’t recommend it as it can cause problems. Dimming electronic transformers can be an experimental process. It is not always straightforward. Do remember that you will need a neutral wire for the electronic low voltage dimmer.
Note: Do not mix electronic and magnetic transformers on a dimmer.