I have no idea at the moment where to find a reference for the specific result you seek. However, it can be deduced from the following fact: topological manifolds (paracompact and Hausdorff) are absolute neighbourhood retracts, and thus have the homotopy type of CW-complexes. This is briefly stated in corollary 1 of Milnor's article On spaces having the homotopy type of a CW-complex (published in Trans. Amer. Math. Soc. 90, 1959, pages 272-280). An extensive discussion of these matters is given in the thesis A topological manifold is homotopy equivalent to some CW-complex by Aasa Feragen. For the specific case of compact manifolds, an elementary proof is given in the appendix of Hatcher's book Algebraic topology (see corollary A.12 there).
We can now prove the result you state. Let $Y$ be a CW-complex admitting a homotopy equivalence $f : Y \to \partial M$ to the topological manifold $\partial M$. Denote by $j : \partial M \to M$ the inclusion of the boundary of $M$, and factor the composition
$$ Y \overset{f}{\longrightarrow} \partial M \overset{j}{\longrightarrow} M $$
as the inclusion of a sub-CW-complex $i : Y \to X$ followed by a weak equivalence $h : X \to M$. The weak equivalence $h$ is a homotopy equivalence since both its domain and its target have the homotopy type of CW-complexes.
Finally, let me briefly justify why we can take $i : Y \to X$ to be the inclusion of a subcomplex of a CW-complex. The usual construction of the factorization above produces $(X,Y)$ as a relative CW-complex, i.e. $X$ is obtained from $Y$ by adding cells in increasing order of their dimension. Now observe that this construction can be modified to inductively build $X$ as a CW-complex itself: at each stage of the construction of $X$, we can replace the attaching maps of the cells with homotopic cellular maps using the cellular approximation theorem.