Did the tendency to raise the sixth evolve out of dorian, or did it evolve as an artifact of major/minor tonality?
Historically, neither. Rather, the historical starting point is Dorian, which was, along with its plagal counterpart hypodorian, one quarter of the 8-mode system that arose in the medieval period. The other three parts of this system were the plagal and authentic modes that correspond to the modern Phrygian, Lydian, and Mixolydian modes.
The tendency to lower the sixth was one of the major factors leading to the evolution of the twofold major/minor tonal system. Others were the tendencies to raise the leading tone of both Dorian and Mixolydian and to lower the fourth degree of Lydian.
The Aeolian and Ionian modes were only "invented" (as theoretical artifacts) in the middle of the 16th century with the publication of Glarean's Dodecachordon in 1547. But centuries earlier, even without considerations of harmony or counterpoint, untransposed monophonic chant in the Dorian mode could use B♭ as the upper neighbor of the dominant (for example in the Kyrie orbis factor, which appears in a 13th-century manuscript, so it is at least that old).
Contrapuntal considerations increased the pressure to lower the sixth degree of the Dorian mode, as well as to raise the leading tone (of both the Dorian and Mixolydian modes). But these pressures were contextual, so the alterations did not necessarily apply everywhere in any given piece. This contextual element survives today in the existence of the various forms of the minor scale.
These modifications were treated as conventions applied to the older system without being part of it, strictly speaking ("musica ficta"). There was no place in Guido's system for sharps, yet they were in common use by the sixteenth century (although not yet in key signatures). By the 16th century, people were writing music that can for the most part be described using modern tonal harmonic theory. Glarean's theoretical innovation was an important step toward formal recognition of these conventional extensions of the modal system that would lead to the two modes, major and minor, of tonal harmony.
After Glarean, we started to think of the underlying mode of minor keys as being Aeolian. But this happened slowly. Even two centuries later, it was very common for minor-key pieces to have Dorian key signatures; a famous example is Bach's "Dorian" toccata and fugue in D minor with no flats or sharps in its key signature. It has been given this name even though the other famous toccata and fugue in D minor also has the same key signature. (Modern editions of such pieces typically add a flat to the key signature.)
Put another way: did dorian evolve towards minor by keeping its raised sixth when ascending and then adding a raised seventh?
You could say this, but putting it in terms of lowering its sixth when descending might be more precise. More generally, one should probably say that there has always been some instability around the identity of the sixth degree of the Dorian scale. This started as a tendency to lower it, first as an upper neighbor and later more generally when descending. With the advent of counterpoint and harmony, the identity of the seventh degree also became ambiguous. Then Glarean came along and gave us a new, distinct mode that we could use to describe cases where the sixth degree is lowered, so it was no longer necessary to think of that B♭ as an alteration to the Dorian mode; instead, we could think of the piece as being in transposed Aeolian mode.
This wasn't as neat and tidy as it might seem, however, because of the common use of both the lowered and raised sixth degree in most pieces. Real music uses both, so it isn't necessarily clear whether a piece is in Dorian or Aeolian, but but whichever one we choose, we have to allow for the fact that it will be altered frequently. Glarean simply formalized a long, slow shift in which people came to see the base set of unaltered pitch classes as Aeolian rather than Dorian.