Kind of close,,,,
This is interesting:
https://en.wikipedia.org/wiki/Smuggling_of_silkworm_eggs_into_the_Byzantine_Empire
"Silk, which was first produced sometime during the fourth millennium BC
by the Chinese, was a valuable trade commodity along the Silk Road.[2]
By the first century AD, there was a steady flow of silk into the Roman
Empire.[2] With the rise of the Sassanid Empire and the subsequent
Roman–Persian Wars, importing silk to Europe became increasingly
difficult and expensive. The Persians strictly controlled trade in their
territory and would suspend trade in times of war.[3] Consequently, the
Byzantine Emperor Justinian I tried creating alternative trade routes to
Sogdiana, which at the time had become a major silk-producing centre:[4]
one to the north via the Crimea, and one to the south via Ethiopia.[5]
The failure of these efforts led Justinian I to look elsewhere.
Expedition
Two unidentified monks -- made their way to China by 551 AD.[6] While
they were in China, they observed the intricate methods for raising silk
worms and producing silk.[6] This was a key development, as the
Byzantines had previously thought silk was made in India.[7] In 552 AD,
the two monks sought out Justinian I.[5] In return for his generous but
unknown promises, the monks agreed to acquire silk worms from China.[4]
They most likely traveled a northern route along the Black Sea, taking
them through the Transcaucasus and the Caspian Sea.[1]
Since adult silkworms are rather fragile and have to be constantly kept
at an ideal temperature, lest they perish,[8] they utilized their
contacts in Sogdiana to smuggle out silkworm eggs or very young larvae
instead, which they hid within their bamboo canes.[1][5] Mulberry
bushes, which are required for silkworms, were either given to the monks
or already imported into the Byzantine Empire.[1] All in all, it is
estimated that the entire expedition lasted two years.[9]
Impact[edit]
Byzantine silk
Shortly after the expedition there were silk factories in
Constantinople, Beirut, Antioch, Tyre, and Thebes.[5] The acquired silk
worms allowed the Byzantine Empire to have a silk monopoly in Europe.
The acquisition also broke the Chinese and Persian silk monopolies.[1]
The resulting monopoly was a foundation for the Byzantine economy for
the next 650 years until its demise in 1204.
-----------------------------
But there are certainly others that retell the story
your teacher told:
https://aelarsen.wordpress.com/2015/01/28/marco-polo-west-meets-east/
Tells the tale:
"Polo’s father and uncle get caught trying to smuggle silk worms out of
China hidden in a hollow staff, and this gives Marco probably his most
interesting plot-line, in which he is given permission to decide their
punishment for himself. This is a remarkably silly story-line. In 551
AD, a pair of Christian monks actually did smuggle silk worms out of
China, eventually getting to the Byzantine Empire, where a thriving silk
industry sprung up, forming a major feature of Byzantine diplomacy until
the 1140s, when King Roger II of Sicily attacked the Byzantines and
literally stole the entire silk industry from them, bringing it back to
Sicily, where it quickly spread to the rest of Italy. If the Polos
thought they could get rich smuggling silk worms from China to Italy in
the 1270s, they had a rather defective business plan, since it would be
the equivalent of trying to make a killing by smuggling cars into Detroit."