Can those inside legally use the emergency exit to leave, even though it isn't an emergency?
If you don't have to go through the emergency exit then don't. If you were really being held against your will for a long time or were in danger then go for it, but if the people just want to talk to you for a little while and you don't want to be there don't. It's about the situation not just if you are there and don't want to be.
If those inside can't legally use the emergency exit, are those who locked all the other exits innocent of illegal detainment? After all, everyone inside could leave by the emergency exit if they so desired, so they aren't actually trapped.
You could go out the normal door if you aren't trapped there. Again, a police officer or prosecutor will look at the actual event and the intentions of those involved, but in general, the person who does not want you to leave should not threaten you or use force to keep you there.
There is a difference between some friends standing in the door saying no we don't want you to leave yet as a joke and someone who wants to hold you captive is what I mean. Being that you are asking on here and did not run to the police immediately I'd assume you were not held hostage, but most likely someone at work or whatever wanted you to do something before you left. While they still shouldn't do that, it's a little different than an actual hostage situation.
The officer involved will have to make the call, but if it's a situation where there is no threat to you or assumed threat most police officers won't consider you a hostage.