Let $A$ be a Dedekind domain. PID implies UFD. So for the other direction assume $A$ is an UFD. In this proof the author only considers prime ideals instead of any proper ideal. Why is this sufficient?
In the case of Dedekind domains, the story is much simpler. Every ideal factorises (uniquely) as a product of prime ideals. Since a product of principal ideals is principal, it is sufficient to show that prime ideals are principal.