The simplest and almost always best rule is:
Place the modifier as close as possible to the thing being modified.
caw
I can see, though, how tonten might have thought he was doing exactly that. Syntactically, we have to co-ordinated adverbials.
Examples, of obvious adverbials:
He was walking down the street very quickly.
He was walking down the street on Sunday.
Adverbials are fairly flexible in their position. When they come at the end of the sentence, they generally are part of the point you want to make.
On Sunday, he was walking down the street. (...and not doing anything else)
He was walking down the street on Sunday. (...and not on Saturday.)
Now adverbials can also involve information about the way someone does something.
He was walking down the street naked.
This doesn't cause an ambiguity, because an adjective that modifies a noun usually comes before the noun. You would expect:
He was walking down the naked street.
A very different sentence.
Things like that are confusing, because an adjective functions as an adverbial. You wouldn't say:
NO:He was walking down the street nakedly.
So here's the current example:
They were walking down the street
- dressed in plain clothes
- with somewhere to go
- just like any other traveller.
The ordering is deliberate, too: The implication is that the other travellers are also dressed in plain clothes and have somewhere to go. Rhetorically, we have two adverbials that give examples of the manner in which they are walking down the road, and one that summarises the point (as I read it: they're blending in).
The syntactic problem is that the adverbials look exactly like noun-modifiers:
"the street dressed in plain clothes", "plain clothes with somwehere to go".
Such sentences are fairly common, I think, and rarely cause confusion:
"I gave you the present with best intentions." etc.
Note that any other position for the adverbial sounds very different:
With best intentions, I gave you the present.
I, with best intentions, gave you the present.
The emphasis is now off.
What sort of ambiguities actually cause confusion, and under what circumstances is a very interesting topic, and I'm not sure how much the experts know about this.
I have some unsystematic theories: for example, I'd say that the ambiguity worsens if you turn the definite article into an indefinite one:
They were walking down a street dressed in plain clothes.
I can see two reasons why this is so: (1) Definite articles already imply a specific noun. Unless there's context to make you think otherwise
(There were two streets. They were walking down the street dressed in plain clothes. The uniformed street seemed too stiff.), you won't worry about what sort of street. (2) "Walking down the street" is a common collocation - i.e. these are words that appear together so often that you're used to reading them as a unit. Changing the article lowers the likelihood that you perceive the noun phrase as a unit.
Similar things go on in cornflake's example:
The girl found her doll playing under a tree in the back yard.
That's a very good example of a dangling participle that causes confusion, or if not confusion unintentional humour. Cornflake says that your example isn't that extreme, and I agree. But figuring out the difference isn't as easy as it should be. Why are some examples more extreme than others?
Putting the modifier close to the item it modifies is a good idea, but sometimes it clashes with other goals, sometimes it results in odd sentences, and sometimes you think you've done exactly that (i.e. there are different syntactical interpretations, and you don't see the confusing one).
Personally, I think the sentence is grammatically fine, but I agree with Fallen that the least edit it needs are the commas. (Clarification of "grammatically fine": I don't consider commas part of grammar; they're part of orthography. Thus your sentence is grammatically fine, but not orthographically.)
Basically, I agree with just about everything is this thread. The reason I posted is that I sort of feel bad about you feeling embarrassed, since I think it's fairly understandable that you didn't spot the dangler. I have no opinion on whether the sentence needs editing (apart from Fallen's commas), since I don't like to judge stuff out of context.