I’m trying to install a Lutron Maestro fan/light dimmer, but it turns out the wires in the switch box don’t seem to do what I expected. Currently, the fan and its lights can be turned off completely by a single switch on the wall, and there are also pull chains to separately turn the lights and/or fan on/off when the switch is on. The switch box is wired like this:

Originally, I thought that this could work because there are two black wires (joined together) and a red one, so three in total. However, it seems that the two black wires actually must be joined for the circuit to work – if I separate them, neither the fan and its lights nor the lights in the adjacent room turn on anymore.
Does that mean that I can’t control the fan and its lights separately after all? If so, why would one of the wires be red instead of black?
This is in Canada (Ontario) in a townhouse built in the early 1980s, if that matters.