"I met him(,) sitting on the chair(,) and talked to him." Who was sitting on the chair?
I met him sitting on the chair and talked to him. - (He was sitting on the chair)
I met him, sitting on the chair, and talked to him. - (I was sitting on the chair)
Is that correct?
I feel safer with the first sentence, less so with the second (which I would probably prefer to reword – nevertheless, I would like to know whether it is correct).
So far, I know the following rule:
If a participial phrase comes at the end of a sentence, a comma usually precedes the phrase if it modifies an earlier word in the sentence but not if the phrase directly follows the word it modifies. (In contrast to the examples above these sentences end with a participial construction.)
The local residents often saw Ken wandering through the streets. (The phrase modifies Ken, not residents.)
Tom nervously watched the woman, alarmed by her silence. (The phrase modifies Tom, not woman.)
As AmE speaker points out in a comment, the problem of ambiguity has more to do with the equivocal positioning of modifying phrase with respect to the thing to be modified than with punctuation choices.
In the first version of your first example—
I met him sitting on the chair and talked to him.
—I agree with you that the no-comma version implies that "he" is the one sitting in the chair. But I am less persuaded by the argument that the second version of that example—
I met him, sitting on the chair, and talked to him.
strongly hints that the speaker is the one sitting. If everyone followed the rules of sentence construction taught during the 1900s, you could claim that the following version of the sentence is logically unambiguous:
Sitting on the chair, I met him and talked to him.
because, logically, when it appears at the beginning of a sentence, a phrase of the form "sitting on the chair" would seem to be subordinate to the noun that follows it. But in real life, many English speakers (and writers) dangle such modifying phrases all the time without intending to specify thereby which noun they mean for the phrase to modify. The only way to ensure that the hearer or reader has no doubt that the modifying phrase is supposed to attach to the speaker is to make the modifying phrase itself unambiguous:
As I was sitting on the chair, I met him and talked to him.
Or alternatively
I met him and talked to him while I was sitting on the chair.
The second example—
The local residents often saw Ken wandering through the streets.
—clearly points to Ken as the wanderer. But adding a comma after Ken would not reverse the meaning to suggest that the residents were the wanderers. To convey that meaning you would again have to make the intended association clearer in the modifying phrase itself:
The local residents often saw Ken as they wandered through the streets.
or
As they wandered through the streets, the local residents often saw Ken.
The third example—
Tom nervously watched the woman, alarmed by her silence.
—strongly points to Tom as the alarmed person; but that is partly because the her in "alarmed by her silence" almost certainly refers to "the woman" and not to "Tom." If we change Tom to Tamara, the intended meaning of the sentence becomes less obvious:
Tamara nervously watched the woman, alarmed by her silence.
Does this sentence mean that Tamara was alarmed by the woman's silence or that the woman was alarmed by Tamara's silence or that Tamara was alarmed by Tamara's silence or that the woman was alarmed by the woman's silence? The first meaning is still the most probable (by a substantial amount), but the logic employed by everyday speakers of English hardly renders the other three possible interpretations unthinkable.
The main basis we have for discarding the third and fourth interpretations is not that the sentence won't bear those readings, but that if such a self-referential meaning were intended, we would expect the writer to do a better job of signaling that intention to us. That is, we would expect the sentence to say something like
Alarmed at her own silence, Tamara nervously watched the woman.
if the third meaning were intended, or something like
Tamara nervously watched the woman, who seemed alarmed by her own silence.
The first and second meanings could be signaled more strongly, too:
Alarmed by the woman's silence, Tamara nervously watched her.
if the first meaning were intended, and
Tamara nervously watched the woman, who seemed alarmed by Tamara's silence.
if the second meaning were intended.
The upshot of all this is that although commas can help clarify which noun a modifying phrase is supposed to attach to, it is not at all unusual to encounter phrases where readers must depend on context to infer the intended association, regardless of the writer's comma usage. In such cases, writers are likely to have more success in clarifying what goes with what by altering the content of the modifying phrase and its placement in the sentence than by relying on punctuation to do the job.