Hmm, tough one. It's hard to find much at all on this in grammar books, and if you do find anything, it is likely to be more about semantics (e.g. "(F)or many main clauses with two or more noun phrases, there is usually only one noun phrase that qualifies semantically as the subject of the participle clause" -
The Grammar Book, Second edition, page 503) than offering any firm rules.
I'd just like to say that the sentences are not entirely identical:
a)They ruled (THE country) using/WITH a policy called apartheid.
? They ruled the country (that was) using a policy called apartheid.
b)They photographed (THE) animals (that were) wandering around (them).
To avoid any possible ambiguity, additions or re-ordering can be made (though stylistically, these suck, as they repeat "around"):
-harzer's sentence (note WITHOUT an ambiguous "they wandered" after the "while", so it all coheres nicely as a single unit)
-They wandered (around), photographing the animals around them.
-Wandering (around), they photographed the animals around them.
The core idea is basically, "They photographed the animals around them", and there is no need to mention the instrument ("using a camera").

(There is also no need to mention apartheid specifically, in sentence a), but it does add some useful extra historical information).
I suppose that Howard Jackson says kind of the same thing that I am trying to say (or rather, show) here in his
Grammar and Meaning (page 194):
>>>
She watched him eating for a moment.
(T)he -
ing-clause ('him eating') functions as Object of the perception verb
watch.
Note that the Temporal Adjunct 'for a moment' is dependent on watch, not on eat: it is an element of the sentence, not of the -ing-clause.<<< (My emphasis, in bold)
I have basically taken the "around" and made it more obviously an element of the sentence
before the "wandering" confuses things. That being said, the participle does add an action and therefore a certain colour that might therefore still need or want expressing, so it will be necessary to become familiar with it; students who meet it will hopefully build up a tolerance for ambiguity and come to process the sentences more as native speakers do, without the need for "fully"
understanding or unravelling every last nuance.
ACTUALLY, come to think of it, forget all the above if you like, because you could achieve as much if not more simply by adding a comma to your two original sentences (and I did so, subconsciously, above):
a)They ruled the country
, using a policy called apartheid.
b)They photographed animals
, wandering around.
If you then changed the order of the elements, things would become even clearer:
a)Using a policy called apartheid
, they ruled the country.
b)Wandering around
, they photographed animals.
Hope this is interesting, even if it isn't really ultimately all that clear or helpful.
