Yes, your formula yields the unique extension of $\rm\:gcd\:$ from integers to rationals (fractions), presuming the natural extension of the divisibility relation from integers to rationals, i.e. for rationals $\rm\:r,s,\:$ we define $\rm\:r\:$ divides $\rm\:s,\:$ if $\rm\ s/r\:$ is an integer, $ $ in symbols $\rm\:r\:|\:s\:$ $\!\iff\!$ $\rm\:s/r\in\mathbb Z.\: $
[Such divisibility relations induced by subrings are discussed further here]
Essentially your formula for the gcd of rationals works by scaling the gcd arguments by a factor that yields a known gcd (of integers), then performing the inverse scaling back to rationals.
Even in more general number systems (integral domains), where gcds need not always exist, this scaling method still works to compute gcds from the value of a known scaled gcd, namely
$\rm{\bf Lemma}\ \ \ gcd(a,b)\ =\ gcd(ac,bc)/c\ \ \ if \ \ \ gcd(ac,bc)\ $ exists $\rm\quad$
Therefore $\rm\ \ gcd(a,b)\, c = gcd(ac,bc) \ \ \ \ \ if\ \ \ \ gcd(ac,bc)\ $ exists $\quad$ [GCD Distributive Law]
The reverse direction fails, i.e. $\rm\:gcd(a,b)\:$ exists does not generally imply that $\rm\:gcd(ac,bc)\:$ exists. $\ $ For a counterexample see my post here, which includes further discussion and references.
More generally, as proved here, we have these dual formulas for reduced fractions
$$\rm\ gcd\left(\frac{a}b,\frac{c}d\right) = \frac{gcd(a,c)}{lcm(b,d)}\ \ \ if\ \ \ \gcd(a,b) = 1 = \gcd(c,d)$$
$$\rm\ lcm\left(\frac{a}b,\frac{c}d\right) = \frac{lcm(a,c)}{gcd(b,d)}\ \ \ if\ \ \ \gcd(a,b) = 1 = \gcd(c,d)$$
See this answer for the $k$-ary inductive extension of the above gcd formula.
Some of these ideas date to Euclid, who computed the greatest common measure of line segments, by anthyphairesis (continually subtract the smaller from the larger), i.e. the subtractive form of the Euclidean algorithm. The above methods work much more generally since they do not require the existence of a Euclidean (division) algorithm but, rather, only the existence of (certain) gcds.