Setting Off Participles With Commas
I'm stuck on whether it's good style to use a comma to set off a participle by itself from the rest of the main clause:
e.g. Alice walked out of the burning school(,) crying, and joined the crowd of students, teachers, and police officers.
It isn't ambiguous here about whom 'crying' is referring to, which is why I'm wondering if both versions of the sentence are grammatical. However if I did set it off, does the participle need an object, or is it fine being on its own as an adjective modifying Alice?
Also, would it even be fine to write:
e.g. Alice walked out of the burning school, crying. She'd left her backpack containing all of her project notes in the library when she was forced to evacuate.
In the first sentence, set off crying because it's a separate action. If the sentence read "Alice walked out of the burning school crying," it becomes ambiguous who is doing the crying -- Alice or the burning school. You have to purposefully focus on the fact that burning schools don't cry to sort out the meaning of the sentence, and even then you're left with doubt -- I can see a dreamlike metaphysical fantasy using this sentence to refer to the school. It introduces just enough ambiguity to be problematic.
The second example you have is clearer; in both cases setting off the participle increases the clarity of the sentence.