Here is my proof (not from the textbook). Please let me know if it is wrong.
PROOF:
I prove by contradiction i.e. I assume N as smallest +ve integer which has non-prime factor p and a prime factor q
N = p * q
p = N\q
from our assumptions, p is an integer, it is not prime and it is expressed as a fraction of 2 integers.
This is a contradiction (when you substitute p as the new N). Therefore, p is a prime and hence N is a product of primes.
The proof is incorrect because you are claiming to derive a contradiction from $p$ not being a fraction of two integers. However, $6=\frac{12}{2}$ is not prime, it has prime denominator, and it is a fraction of two integers, so this isn't actually a contradiction. (Here $p=6$, $q=2$, and $N=12$).