I think this is falseThese curves may actually exist, because ofas the following example shows.
Let $C$ be a smooth curve of genus $g$. Then the diagonal $\Delta \subset C \times C$ is isomorphic to $C$ and has self intersection $\Delta^2= 2-2g$.
On the other hand, the tangent space of the Hilbert scheme $\mathscr{H}$ of $\Delta$ in $C \times C$ at the point $[\Delta]$ has dimension given by
$$ \dim _{[\Delta]} \mathscr{H} = h^0(\Delta, \, N_{\Delta/ C \times C}) = h^0(\Delta, \mathscr{O}_{\Delta}(\Delta))$$ `
and this quantity is $0$ for $g \geq 2$, sincebecause in that case $\Delta^2 < 0$.
This precisely means that $\Delta$ is rigid in $C \times C$ as soon as $g \geq 2$.
The cone of effective curves in $C \times C$ ($g \geq 2$) is quite subtle, and not fully understood in general. For further details, see [R. Lazarsfeld, Positivity in Algebraic Geometry I, Section 1.5].