I think this is true. Let $b = a^{\frac{N-1}{2p}} = a^{2^{m-1}p^{n-1}}$, and note that we have $\frac{b^{p}+1}{b+1} \equiv 0$ (mod $N$).
Now $a$ and $N$ must be coprime, so that $b$ and $N$ are coprime. We have $b^{2p} \equiv 1$ (mod $N$).
Now $b^{p}-1$ and $b^{p} +1$ have gcd dividing $2$. However $\frac{b^{p}+1}{b+1}$ is always odd, so that $\frac{b^{p}+1}{b+1}$ and $b^{p}-1$ are relatively prime.
If $q$ is a prime divisor of $N$, then $b+1$ is not divisible by $q$, for otherwise $\frac{b^{p}+1}{b+1} \equiv p$ (mod $q$), whereas we should have $\frac{b^{p}+1}{b+1} \equiv 0$ (mod $q$). Also, $b \not \equiv 1$ (mod $q$), since $b^{p}-1$ is coprime to $N.$
Hence $b^{2}-1$ is coprime to $N.$
The multiplicative order of $b$ (mod $N$) is a divisor of $2p$, but is not equal to $2$. Hence $b$ has multiplicative order $2p$ (mod $N$).
Hence the multiplicative order of $a$ (mod $N$) is a divisor of $2^{m}p^{n}$, but neither $b = a^{2^{m-1}p^{n-1}}$ nor $b^{2} = a^{2^{m}p^{n-1}}$ is congruent to $1$ (mod $N$).
Hence $a$ has multiplicative order $2^{m}p^{n} = N-1$ in $\mathbb{Z}/N\mathbb{Z}.$
But the multiplicaitive order of $a$ (mod $N$) is a divisor of $\phi(N)$, so we must have $\phi(N) = N-1$, and $N$ is prime.