The answer (number of distinct sequences with $a$ $1$'s and $b$ $0$'s, where rotations are treated as equivalent) is a sum over common divisors of $a$ and $b$:
$$\frac1{a+b} \sum_{d \,\mid\, \gcd(a,b)} \phi(d) \binom{a/d + b/d}{a/d}$$
Proof below, but for the special cases you mentioned:
when $a + b = p$ is prime and both $a$ and $b$ are nonzero (or more generally whenever $\gcd(a, b) = 1$), then the only common divisor of $a$ and $b$ is $1$, so the number is:
$$\frac{1}{a+b} \binom{a+b}{a} = \frac{1}{a+b} \frac{(a+b)!}{a!b!}$$
when $a = b = p$ for some prime $p$, then the common divisors of $a$ and $b$ are $1$ and $p$, so
$$\frac{\binom{a+b}{a} + (p-1)\binom{1+1}{1}}{2p} = \frac{\binom{2p}{p} + 2(p-1)}{2p}$$
The ultimate tool for such problems (at least, ones that don't require Pólya theory) is Burnside's lemma ("the lemma that is not Burnside's"), which states that for a group $G$ acting on a set $X$, the number of distinct orbits is
$$|X/G| = \frac{1}{|G|}\sum_{g \in G}|X^g|.$$
For our case of counting necklaces (strings treated as equivalent under rotations (=circular shifts)), the group $G$ is that of the $n$ possible rotations. Suppose all the necklaces we are concerned about are of length $n$. For a particular rotation $g$ which is a rotation by some number $k$, the set $X^g$ denotes those sequences that are left invariant by a rotation by $k$, i.e. those in which every $k$th symbol is the same. If $\gcd(n, k) = n/d$, this means that there is essentially a string of length $n/d$, which is repeated $d$ times. And the number of $k$ such that $\gcd(n, k) = n/d$ is $\phi(d)$.
Thus,
$$
\begin{align}
|X/G|
&= \frac1n \sum_{k=0}^{n-1} \text{(number of strings of length $\gcd(n, k)$)} \\
&= \frac1n \sum_{d \mid n} \phi(d) \cdot \text{(number of strings of length $n/d$)} \tag 1
\end{align}$$
just as in the necklace-counting theorem.
All the above is very general (to count necklaces of length $n$), but in our case, the number of strings of length $n/d$ is not $k^{n/d}$ as in the theorem that counts the number of $k$-ary necklaces. If we want to make a string of length $n$ containing $a$ $1$s and $b$ $0$'s, out of $d$ copies of a string of length $n/d$, then that smaller string must have $a/d$ $1$'s and $b/d$ $0$'s, which is only possible if $d$ divides both $a$ and $b$ (and therefore $\gcd(a, b)$). In that case, the number of strings of length $n/d = a/d + b/d$ that contain $a/d$ $1$'s and $b/d$ $0$'s is $\binom{a/d + b/d}{a/d}$. Plugging this into $(1)$ gives the expression stated at the beginning of the answer:
$$\frac1{a+b} \sum_{d \mid \gcd(a,b)} \phi(d) \binom{a/d + b/d}{a/d}$$