Another thing to consider is that the open-circuit output voltage of a transformer will be higher than the rated voltage (the voltage at the current the transformer was designed for). Since you didn't offer the current rating on the transformer (I'm assuming you already have a 12VAC transformer in mind, else why ask the question). So, if the current rating on the transformer is higher than the current required to run the fan blower, then you'll come closer to the 24 VDC to run the fan.
Bottom line, you can always use more transformer than required. One generally designs for the optimal balance between cost and functionality, but if you already have the part, or if it's on sale, or something, then why not. As long as it delivers the required power and will fit in the box, then yer good to go