The only subgroup of $D_{2n}$ that has order $m$ is generated by $x^{2^k}$. This is cyclic, and normal, and $D_{2n}/\langle x^{2^k}\rangle \simeq D_{2^{k + 1}}$. As $\langle x^m, y\rangle \simeq D_{2^{k + 1}}$ and this surjects onto $D_{2^{k + 1}}$ in the quotient we have $D_{2n} \simeq \mathbb Z/m \rtimes D_{2^{k + 1}}$ and we have that this is the only decomposition with $\mathbb Z/m$ as the first factor.
So then the question is, is $H \times \mathbb Z/2^k \simeq D_{2^{k + 1}}$? If $k = 1$ then $D_{2^{k + 1}} = D_4 \simeq \mathbb Z/2 \times \mathbb Z/2 \simeq H \times \mathbb Z/2$ and we're good. On the other hand, if $k > 1$ then $D_{2^{k + 1}}$ is not abelian but $H \times \mathbb Z/2^k$ is, so they're not isomorphic.
So the answer is that such a decomposition is possible if and only if $k = 1$.