I came across a piece which uses a dorian progression:
i - IV - VII - III - ii7 - v - V
V is a borrowed chord, but is it possible to determine from which mode this chord was borrowed? (lydian, locrian, ionian)
If it's just that isolated V chord that is borrowed, then no, I don't see any way to determine whether that chord is borrowed from Ionian or Lydian.
(It won't be borrowed from Locrian, because the Locrian V is built a half step lower. In D Locrian, V is built on A♭, whereas it is built on A♮ in D Ionian and D Lydian.)
Now, if there are other elements in the work that also use borrowed material---let's say, for instance, that another section of the work clearly borrows from Lydian---that could be a good reason to suggest it's borrowed from Lydian, if only for the analytic consistency.
I'll also say that, normally, "mode mixture" and "borrowed chords" deal with switches between major and minor; I'm not used to hearing these terms in conjunction with modes, but maybe I'm just not in the right circles. In your cited instance, I think most would simply say this progression "uses a major V."
Dorian is a minor mode, and the v will be minor too. This is similar to the natural minor. The melodic and harmonic minors usually take the dominant as V, making the leading note a semitone under the tonic - far more convincing. That's what's happened here. No particular borrowing, just making things sound more tuneful.