And that indeed is my final point, Bagpuss.
Since, in this case, the CL of the scroll is higher than the level of the druid (who is level 7), there would normally be no HD restriction in this case, considering what we want to turn the wolf into. No dragon companions...just an upgrade to Dire Wolf...or maybe something that flies like a pegasus or giant owl. I'd have to count points to see which of those two would or would not be permanent. This by the way is a possible solution to upgrading the companion without switching to a real dire wolf with a -6 level penalty, losing all those neat skills and abilities, starting out with, for all intents and purposes, a beginner animal. Anyway...
If we were turning it into, say a dire bear who has more than 7 HD, I believe that the druid's class feature description of limiting the HD of the companion would take effect. And no...if that's the case it won't mean the spell would fail. It would just turn into a 7HD dire bear or dragon or bulette or whatever. I'm fairly sure this is how the DM will rule but again, in our scenario, it's not particularly relevent.
My main concern is, WILL the Animal Companion be "willing?" If we do this, how will the wolf react to turning into a dire wolf or giant owl?