No. They could not.
Look at the Nazi V2 program. Tens of thousands of workers and the best machining technology in the world still took the entire war to stop exploding. The level of precision, the shear number and complexity of a liquid-fueled missile is astounding. The United States was still struggling to match their success well into the 50's. Even in a time of tremendous technical achievement, this is still REALLY HARD. We STILL LOSE ROCKETS ALL THE TIME.
If you only require a solid fueled rocket, sure, they had medieval uses. Think arrow with an Estes rocket. But this is far short of what you describe. The solid rocket fuel available was gunpowder! Larger rockets would just explode.
As for mechanical guidance systems, watch the historical docudrama Longitude (http://www.imdb.com/title/tt0192263/). 1700's machining technology was worlds part from medieval, and it took a LIFETIME to create a clock that could work in a ship. Size was a huge issue - before this time it was challenging to even fit the clock in the ship, let alone keep time once you got it there.
More than size, the motion of the ship across the ocean, both from the waves and the rotation of the ship to turn, caused huge timing difficulties. Imagine the problems in a missile! Which way is up or down in a spinning, arcing missile? A pendulum will LIE!
The metallurgy to deal with the heat and pressure, the chemistry to create and manage the propellant, the precision to make the parts fit and work together, understanding of aerodynamics, availability of materials etc DID NOT EXIST.
For a medieval kingdom to be "gifted" the knowledge to do this would involve dozens of graduate degree programs to be introduced, taught and understood, and a century or more of "bootstrapping" infrastructure to be able to use the technical know how.
If you want to make a steam punk medieval story, knock yourself out. But no, it wouldn't be realistic, and for fiction that's ok!
Note on potential simple rockets
The rockets of the day COULD NOT SCALE, as they used gunpowder as a propellant. Bigger rockets would simply be pipe bombs. However, a very simple, unguided, solid-fueled rocket might be able to be built from a diagram and a hundred page instruction manual(Contrast that to dozens or hundreds of career specialties to conjure from thin air for the liquid fueled rocket). Think tube with burn paste. Not a missile, but rocket.
All modern formulas use aluminum(an absolute no-go for medieval construction. This material was the "carbon nanotubes" of the 1800's, costing about 50 times as much as gold), although I think that could be worked-around out by a clever modern chemist using an available substitute.
There is also alternative old school formulas, like the gun cotton civil war rocket, which was not really a success at the time, but could serve as a definite alternative to a more modern approach. Featured on mythbusters.
A steam rocket might be something to look at to, the mythbusters created a "rocket" using a water heater that went over three hundred feet in the air.
You would probably need something more powerful than black powder for the warhead, but I think dynamite would be really pushing what alchemists of the time could create using tools available, even with detailed instructions.
Better rockets with extensive instructions from modern chemists working closely with historians to make the instructions accessible to the medieval audience is plausible. Large, liquid fueled, guided, or tremendously powerful would absolutely not be.
Rocket Fuel: https://en.wikipedia.org/wiki/Rocket_propellant#Solid_propellants
For fun, look up: civil war gun-cotton rocket mythbuster episode, robert Goddard, alfred nobel's dynamite, "Nazi Megaweapons":V2(on netflix), "When we left earth"(also netflix),"Longitude" as mentioned, mythbuster hwacha episode, mythbusters water heater rocket episode