I have been getting confused thinking about non-constructive proofs.
Several axioms of ZFC imply existence of a set with certain properties, and for each axiom except foundation, infinity, and choice, the set is uniquely characterized by the properties. If I'm not mistaken, the axiom of infinity is equivalent to the existence of $\omega$, which is unique. So it seems to me that a non-constructive proof that a set exists must use choice or foundation.
If there is a proof in (ZF - foundation) that a set with a certain properties exists, is the proof necessarily constructive?
If the answer if 'yes', I am curious about something else. In many branches of math there are non-constructive existential theorems requiring choice. But I can't think of similar examples requiring foundation.
Are there examples of existential theorems of ZF (let's say in branches of math other than set theory) that are non-constructive because the proof requires foundation?
No, not at all. The nonconstructivity in ZFC doesn't come from the axiom of choice or the axiom of foundation. It comes from the underlying logic that is used. Even ZF without foundation is able to prove many theorems that are not constructively valid.
One specific example is the intermediate value theorem from calculus: if $f\colon [0,1] \to \mathbb{R}$ is continuous and $f(0)\cdot f(1) < 0$ then there is an $x \in [0,1]$ such that $f(x) = 0$. This theorem is well known to not be constructively valid: it can be shown that there is no way, given a procedure to compute $f$, to compute a root of $f$. However, the theorem can be proved in ZF with no reference to the axiom of choice or the axiom of foundation.
One actual source of nonconstructivity is the law of the excluded middle, which allows us to divide proofs into cases even when we cannot determine which of the cases holds. In constructive mathematics, the underlying logic is different, and does not allow that kind of nonconstructive reasoning (or other kinds of nonconstructive reasoning).