Sneaking into a school before you're seen and choosing to not leave friends behind after you've already been caught are two completely different things that can work together and actually strengthens the character. Arnold of course could have easily escaped, he even does and hides somewhere else, so there's no question that he could have left. He knew it was wrong to leave his friends behind, and was trying to work out a plan, he does in the end.