Could your average blacksmith demonstrate to the King a new sword making method he developed?
Could a carpenter present an improved version of a trebuchet?
Could a farmer show-off a new plow design?
What if one of Genghis Khan's men was making his own, superior saddle?
How common was it for an peasant - inventor to be appointed to the Kings court?
I imagine in many instances, peasants were punished for trying to innovate.
There is a story in Suetonius about a man presenting the design of a new building machine to the emperor Vespasian, who sees the design, appreciates it, handsomely rewards the man but doesn't use it because he is afraid the increased efficiency of the machine would put people out of work.
Now, there are a few problems with the last bit. For one, Roman construction projects were not organized by using masses of poor people hired for temporary labor, they were built by teams of skilled professional laborers. Secondly, the Romans did use impressive pieces of technology in their construction projects--that tombstone is actually more or less from the Flavian period. Given that a Roman crane makes an individual worker sixty times more efficient (I think, I don't have my source with me) clearly they were willing to use labor saving devices.
But what about the rest of the story? Would someone present new technologies to the emperor for him to use in construction projects? Maybe, but I personally view this as a conventional story element borrowed from very old tropes of skilled craftsmen and wondrous devices. I find it more likely that technological advancement came from within the professional builder companies^1 --someone says that if we do this and this we can build better, they get better projects, and then other companies copy them.
^1 Note that I mean "company" in the literal sense of a group of guys, not in the legals sense of a corporation.