One possible rule:
1. If we have two combined prepositions, r sticks to the next preposition (vo|rauf, vo|ran).
2. If we have a preposition combined with other word classes e.g., nouns, adverbs, verbs… etc., r sticks to the preposition and pronounced accordingly (für|einander, hie|raus).
3. If we do not have a preposition, a-schwa is still pronounced a-schwa (aller|orts, Lehrer|assistent).
Two exceptions: herein and vorüber pronounced with r.
In order to give a precise answer, I had to do a systematic search of all possible combinations of a compound adverb which is obviously the main culprit here. In the following I will provide some examples for each possible combination (some of them do not involve a-schwa but mentioned to clear the issue more):
1. Adverb + Adverb (total 233 results): achteraus, herein, hierorts, hintenheraus, obenherein, obenherum.
2. Adverb + Preposition (total 95 results): herab, heraus, heran, herauf, herüber, herum, herunter, hieran, hierauf, hierunter, hierin, hieraus.
3. Preposition + Adverb (total 41 results): überaus, vorab, überübermorgen, vorerst, vorüber.
4. Preposition + Preposition (total 13 results): voran, voraus, vorauf.
5. Preposition + Pronoun (total 33 results): füreinander, hintereinander, überall, übereinander, untereinander, voreinander, widereinander.
6. Noun + Adverb (total 72 results): bergab, bergan, kopfvor, jahraus, jahrein, türaus, türein.
7. Adjective + Adverb (total 78 results): geradeaus, hochauf, kurzum, querab, querüber, weitaus.
The big idea here lies in word formation. Some words can be a preposition and an adverb e.g., ab, aus, vor, über… etc. The same word is a preposition in some words but an adverb in others sometimes in an unexpected way.
Example 1: aus is a preposition in heraus, hieraus, voraus but an adverb in überaus, achteraus, jahraus, weitaus.
Example 2: ab is a preposition in herab but an adverb in vorab.
Example 3: über is a preposition in überaus, überall, herüber but an adverb in vorüber and querüber.
Example 4: Vor is a preposition in voran, voraus, vorauf, vorerst, vorüber but an adverb in kopfvor.
Note 1: I did not look for all possible combinations of words other than compound adverbs such as compound nouns or adjectives. but I will assume that this rule applies unless counterexamples are provided.
Note 2: In my search, I used canoo to get these possible combinations and dict.cc to check the pronunciation.