Well, the subject is "it", and there's no possibility of thinking that "it" or, what amounts to the same thing, "his duty", could carry a coat, so I don't think there's any chance of confusion here. It's saying, in effect, He had to accompany her, carrying her coat. So the implied subject of 'carrying her coat' is not at all unclear.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.