This is a 'cutting by hyperplanes' argument, which requires some kind of quasi-projectivity. I'm going to reorder it a bit but the idea is the same.
Assuming $V'$ is projective is tantamount to assuming there is a closed embedding $V' \subset \mathbb{P}^n$ for some $n$.
Claim: For a general hyperplane $H$ in $|\mathcal{O}_{\mathbb{P}^n}(1)|$, the restriction $H \cap V' \to V$ is surjective, and $H \cap V'$ is integral of dimension $r' - 1$.
Once we show this, we can repeat this process until we arrive at a linear space $L$, which is general in a reasonable way, so that $X' = L \cap V'$ is an integral curve and the map $X' \to V$ is surjective. The fibers are used because of the following lemma.
Lemma: Consider a morphism $X \to Y$ with $X$ projective and $Y$ irreducible, of dimension $m \geq m'$ respectively. A general fiber $F$ satisfies $\dim F = m - m'$ if and only if map is surjective.
Proof: Since $X$ is a projective variety, its image in $Y$ is closed, so if it is not surjective, then $X$ surjects onto a strict closed subset. Hence in this case a general fiber is empty, so its dimension will certainly be less than $m - m'$. This proves one direction.
Conversely, the dimension formula and this lemma from the stacks project imply that a general fiber of a surjective map in the above setup will have said dimension, thus proving the lemma.
Now we can prove the claim.
Proof of claim: The second part of the assertion follows from Bertini's theorem so we focus on the first. That is, by the lemma, we must show that for general hyperplanes $H \in |\mathcal{O}_{\mathbb{P}^n(1)}|$ and points $x$ in $V$, the fiber over $P$ of $H \cap V' \to V$ has dimension $r' - 2$. To this end, consider the following subvariety $$\Lambda \subset |\mathcal{O}(1)| \times V' = \mathbb{P}^n_{a_0, \dots, a_n} \times V'$$ by $\sum a_i x_i = 0$, where $x_i$ are the coordinates of the projective space $V'$ is embedded in. Note that $\Lambda$ has dimension $n + r' - 1$.
$\Lambda$ the incidence variety colloquially writted as the union $\bigcup_{H \in |\mathcal{O}(1)|} \{H\} \times (H \cap V')$ to emphasize that its fibers over $H$ are precisely the corresponding hyperplane sections on $V'$.
Now let $f: V' \to V$ denote the morphism we started with, and let $\Lambda \to |\mathcal{O}(1)| \times V$ be the map $(H, x) \mapsto (H, f(x))$. As we've seen, a general fiber of this map will have dimension $(n + r' - 1) - (n + 1) = r' - 2$. This proves the result.
$\dim$to format $\dim$ rather than leaving it outside of math mode; there's no need to use the apostrophe as a superscript, it's designed to be used without that - compare$V^{'}$and$V'$, producing $V^{'}$ and $V'$ respectively. – KReiser Sep 10 '23 at 17:21