With the prison's restriction in place, your only option will be to have the refund deposited to a checking account.
The Personal Info interview's name field will not accept numbers (or hyphens or spaces) - this is an IRS limitation that TurboTax must comply with.
Even if you printed your return, manually added the inmate number and then filed by mail, a refund check would not include your inmate number. Checks are printed using automated systems and those systems only have the name that shows in your social security administration records.