There are two different questions or assumptions here...
If you want a mid-length
handguard on a 13" barrel, that's no problem.
I would put a gas block at the carbine location and then a mid-length handguard that covers it.
If you want a 13" barrel with a
mid-length gas system, now you are looking for trouble.
10.5" barrels with carbine-length gas systems are not known for their reliability with as wide a range of ammo as a similar 14.5" barrel would be reliable with.
This is due to the proximity of the gas port to the muzzle.
You need a certain amount of "dwell time" (for lack of a better term) where the gas enters the gas system while the bullet is still in the bore.
The mid-length specs basically call for moving the gas port 2" further forward.
That gets you the same gas system issues with a 13" mid-length that you have with an 11" carbine-length gas system barrel.
Typical 14.5" barrels with carbine gas systems have 6.7" of bore in front of the gas port.
20" rifle systems have 6.8"
16" barrels with carbine gas systems have 8.2" and mid-length 16" barrels would have 6.2"
It's a general guideline that you do not want to go much under 5" before reliability starts to suffer.
11.5" barrels with carbine gas systems have 3.7" in front of the gas port (seeing a pattern here yet?)
10.5" has 2.7" in front of the barrel.
The 14.5" mid-length barrel mentioned in another post above would have 4.7" which is about as short as you want to go.
Lastly, your theoretical 13" barrel with a carbine-length gas system and a mid-length handguard would have 5.2" and you are looking good.
Move that gas port out to mid-length and you only have 3.2", much less than optimum, but it could still be made to run.
Randall Rausch
www.ar15barrels.com