Solution 1:

Zorn’s Lemma states that a nonempty partially ordered set where every chain has an upper bound within the set, necessarily has a maximal element. It is equivalent to the Axiom of Choice.

The set of ideals disjoint from S is nonempty and partially ordered by inclusion. In this partial order, a chain is just an increasing “nested” set of ideals.

Given such a chain, I claim that its union is an upper bound. If the union is in fact within the set; i.e., if the union is itself an ideal that’s disjoint from $S$, then the union is obviously an upper bound of the chain under set inclusion.

But it’s easy to see that the union is such an ideal. Since each component of the union is disjoint from $S$, the whole union also must be disjoint from $S$. If the chain is $\mathscr I=\{ I_\alpha \mid \alpha \lt \kappa \}$ (where $\alpha \lt \beta \Rightarrow I_{\alpha} \subseteq I_{\beta}$) and $x, y \in I= \bigcup \mathscr I$, then $x \in I_{\alpha}, y \in I_{\beta}$, where without loss of generality $\alpha \leq \beta$. Then $x \in I_{\beta}$, and since $I_{\beta}$ is an ideal containing $x$ and $y$, $x+y \in I_{\beta} \subseteq I$ and $I$ is closed under addition. Finally, $\forall r \in R~(ry \in I_{\beta} \subseteq I$), so $I$ is in fact an ideal.

Zorn’s Lemma now applies to tell us there’s a maximal element of this partially ordered set. That maximal element is an ideal that’s maximal with respect to the property of being disjoint from $S$.