If $r=2$ then $r'>0$. For an example where $r'=1$, take a curve such that the jacobian has a nontrivial endomorphism $f$ and such that the group of points in the jacobian is generated by $P,f(P)$ for some point $P$ Now find a prime $p$ splitting in $\mathbb{Q}(f)$ so that $f(P)=\alpha P$ for some $p$-adic number $\alpha$. Then $r'=1$.
Added later: In your toy example, the endomorphism ring contains the fifth roots of unity so it may fall in my example above for those primes that split in that ring. A reasonable conjecture would be that if the endomorphism ring of the jacobian is $\mathbb{Z}$, then $r' = \min \{ g,r \}$. This is likely to be very hard to prove, as it is an abelian variety analogue of Leopoldt's conjecture.