The uncertainty in $p_2$ may be very large, so no.
Imagine $p_2 = 0.67$.
Now that could be 67 out of 100, in which case the standard error of that estimate of $\pi_2$ is about 0.047, so $\pi_2$ might be 0.6 or 0.75 ... but probably won't be 0.5 or 0.95.
However, that $p_2$ might also be 2 out of 3, rounded off - and in the latter case, a very wide range of population proportions could reasonably have given 2 successes out of 3. Assuming $p_2$ is exactly $\pi_2$ would be silly.
But all is not lost.
There's another possibility.
Depending on its value it might be possible to put a lower bound on the $n$ and make progress that way. For example, if $p_2 = 0.412$, the smallest $n$ consistent with that is 17 (7/17 = 0.4117, rounded to 0.412) - no smaller sample size can produce 0.412 with rounding (whether off, up or down).
If you assume the $n$ is at least as large as the smallest $n$ that could have produced your sample proportion, then you will get an upper bound on the p-value. If you're lucky the smallest $n$ consistent with your proportion won't be something like 5.
The more significant figures you have for $p_2$, the better your chances of a useable lower bound on $n$. But if it's a value like 0.67... well, you better hope $p_1$ is a loong way away from it.