No, $m'$ is not intended to be prime.
This is a proof by contradiction; we temporarily assume that our goal (every positive integer has a unique prime factorization) is false, and then show that it being false leads to a contradiction, therefore implying that it must have been true.
So, we assume that there exists some positive integer that has two different prime factorizations. The collection of all positive integers with two different factorizations, being non-empty, has a smallest element; we let $m$ be this smallest element. Thus, any positive integer smaller than $m$ will have a unique factorization.
We are constructing an number $m'$ that will be be a positive integer and smaller than $m$, so that it has only one prime factorization; by studying the prime factorization of $m'$, we can reach a contradiction (like we wanted to).