$c$ consists of all the prime powers in $(m,n)$ that have the same exponent as in $m$ ...
Yes, expensive factorization is not needed. We can compute $\,c\,$ efficiently by iterated gcds that cancel from $\,m\,$ all primes that occur to higher power than in $\,(m,n).\,$ These are exactly the primes in $\,m' = m/(m,n)\,$ and we can cancel them from $m$ by repeatedly cancelling any gcd it has with $\,m',\,$ yielding the solution $\ c = {\rm gdc}(m, m'),\ \ d = (m,n)/c,\ $ where
$\begin{align}&{\rm gdc}(x,y)\ :=\qquad \text{// greatest divisor of $\,x\,$ that is coprime to $\,y$}\\
&\quad {\rm if}\ \, \gcd(x,y) = 1\ \ {\rm then}\ \ x\\
&\quad {\rm else}\ \, {\rm gdc}(x/{\rm gcd}(x,y),\,y)
\end{align}$
Remark $ $ The lcm dual is: there are coprime $\bar c\mid m,\,\bar d\mid n\,$ with $\,{\rm lcm}(m,n) = \bar c \bar d,\,$ which follows from above using $\,\bar c = m/c,\, \bar d = n/d,\,$ so $\,\bar c\bar d = mn/cd = mn/(m,n) = {\rm lcm}(m,n)$