This article is from the Final-Fantasy and other Square Soft Games FAQ, by email@example.com (Nick Zitzmann) with numerous contributions by others.
You wouldn't be able to do anything under regular circumstances, but one
guard decided to nod off while guarding some of your stolen inventory.
Climb into the air ducts above, and find this sleeping guard below. Get
your stuff. With one character equipped, you should be able to find all
your other equipment.
Bonus hint: If you took Ayla before you got into this mess, it makes
things easier since Ayla can fight unarmed, meaning you'll never be able
to get caught outside and dragged back to the cell.