At it is idomatic, as I suspect you know. The OED defines at it under at as:
16b at it: hard at work, fighting, etc.; busy.
I point this out because I think the etymology of the idiom can be gleaned from the nearest definition of at:
16a: With actions in or with which one is engaged: as at dinner, at work, at play.
In other words, at means to be engaged with, or performing actions related to, a thing. Using this definition, I think the idiom can be constructed with it either being something known from context, or a generic reference (meaning, tautologically, "whatever it is you are currently doing").
So, "while you're at it" can mean "while you are engaged in [something apparent from context]".
I'm going to get a loaf of bread from the store.
While you're at it, get a gallon of milk.
The second sentence meaning, "while you're at (or, "engaged in") the task you mentioned", [do this related thing].
From this somewhat literal sense, we can easily jump to a more figurative sense meaning "to be engaged in that with which one is engaged", i.e., "busy", generically.
Edit:
To answer your other question, the only other preposition that I know of that might be used in at's place is about. Again, the OED, 11a of about:
Occupied with, attending to; dealing with; interfering or meddling in; attempting...
including:
while one is about it: while one is doing something already undertaken, so as to save time or effort or as a useful addition.
(The following analysis is adapted from Huddleston and Pullum, The Cambridge Grammar of the English Language, 2002, Ch. 7, 'Prepositions and Preposition Phrases').
Preposition phrases may in some contexts 'stack', just like adjectives and adverbs:
John went [out the door] [along the street] [to the corner].
Prepositions may take other sorts of objects than noun phrases:
- Adverb phrases: I didn't know about it until very recently.
- Interrogative clauses: We can't agree on how to proceed.
- Adjective phrases: They left me for dead.
- Preposition Phrases: He emerged from behind the curtain.
Prepositions may also take no object. It appears to be this use which you call an 'adverbial preposition'; CGEL calls it an intransitive preposition, analogous to an intransitive verb. (I will abbreviate this Pi.) Such a preposition may act syntactically as a complete preposition phrase (PP), just as a bare intransitive verb may act as a complete verb phrase (VP), a bare adjective as a complete adjective phrase (AdjP) or a bare noun or pronoun as a complete noun phrase (NP).
Many such Pi in fact started as actual PP—along and before, for instance, whose first elements are worn-down forms of on and by, respectively. Others, however, are quite ordinary transitive prepositions which have evolved intransitive uses. Consider
She put her hat on.
Traditional grammar treats on as an adverb modifying the verb put, but contemporary grammar understands it as a Pi acting as a PP which in turn acts as a locative complement to the verb, exactly like
She put her hat on her head.
She put her hat on the statue.
Your sentence, then, may be understood as embedding two PP complementing came; the first PP is the bare Pi up, and the second PP is headed by from and takes a third PP, the Pi behind, as its object.
Best Answer
The horse was walking behind its master is fine, no extra preposition is necessary - behind is your preposition.