This is a story Houdini himself would tell when he began to flesh out his official biography in the 1900s. He like to add that the convict was the only man to ever witness his secret of opening handcuffs. The story found its way into the Kellock book and was most recently revived in The Secret Life of Houdini by Bill Kalush. While it may be true Ehrich apprenticed to a locksmith (Kalush believes he was named Mr. Hanauer), the "convict in cuffs" story has never passed the smell test for me. It just sounds too much like self-made mythology dished out to give reporters some compelling copy.
Now here's another reason to doubt the story. The below comes from the December 2, 1905 Walsall Advertiser. Yes, amazingly, Hardeen was also a locksmith's apprentice in Appleton and one day...well, read for yourself:
We know Houdini and Hardeen shared escapes, set dressing, and even stage patter. This shows they also shared the same tried and true publicity. (Hardeen also told a version of being trapped under the ice during a bridge jump.) So I think this just makes the convict in cuffs story all the more likely to be Houdini (and Hardeen) mythology.
Young Ehrich illustration is by Anne Reas from the book The Great Houdini by Monica Kulling (1999).