Question about a proof involving local rings: $R$ has exactly $3$ ideals, show that if $a,b\in I$ then $ab=0$ I have a question regarding the following thread: Commutative unitary ring with exactly three ideals. I believe I've put the pieces together, but I am, for whatever reason, feeling uncomfortable.  So, combining the OP's initial attempt and MooS' second solution, we have:
First, let's prove that if $a\notin I$, then $a$ is a unit of $R$: suppose $a$ is not a unit of $R$.  Then, $I\subseteq I+(a)\subsetneq R$.  Since $1\notin I+(a)$ we have $I=I+(a)$, thus $a\in I$, a contradiction, so $a$ is a unit of $R$.
Now we want to show that if $a,b\in I$ then $ab=0$: By our first part, we conclude that any element not in $I$ must be a unit of $R$, thus any element in $I$ must be a non-unit of $R$.  So, $R$ is a local ring with maximal ideal $I$ (for the rest of this proof, even though MooS uses it, is it necessary that $I$ is finitely generated?  How do we know that?).
So, suppose $ab\neq 0$, then $I=(ab)=(a)(b)=(a)(a)$.  Let $a\in I$, from MooS, we consider the set $A:=\{x\in R:ax=0\}$, which he says is an ideal.  So, we will prove that this ideal is not $\{0\}$: If $a^2=0$, then done, so assume $a^2\neq 0$, then $(a)=(a^2)$ (I assume we can say this because $a^2=a\cdot a\implies a\in(a^2)\implies(a)\subseteq(a^2)$, and certainly $(a^2)\subseteq(a)$, so we get equality), thus $a=ba^2\implies a(ab-1)=0\implies ab-1\in A$.  Now, since $a\in I$, from part the first part of the problem, $a$ is a non-unit, thus $ab-1\neq 0$. (so, is this our contradiction, because $R$ has no zero divisors thus $a=0$?)
EDIT: From Severin's comment, I see why $I$ is finitely generated, and based on Mark's comment, I see why $(a)=I$, but I am still curious if my rationale behind why $a=0$ is valid.  Something still feels slightly off.
 A: As far as I can tell, the reasoning at the very end of your proof does not make any sense. Certainly, $R$ must have zero-divisors, since you are trying to prove that the product of any two elements of $I$ is zero!
In general, I think the structure of your proof is good, but you are over-complicating things. As Mark Saving notes in the comments, one may deduce that $I$ is principal, generated by some nonzero $x \in I$. Hence, it is enough to deduce that $x^{2} = 0$, as every element of $I$ is a multiple of $x$.
Indeed, suppose $x^{2} \neq 0$. Then the principal ideal generated by $x^{2}$ properly contains $\{0\}$ and is contained in $(x)$; by our hypothesis that $R$ contains three ideals, we must have $(x^{2}) = (x)$. In particular, there exists some $y \in R$ such that $x^{2}y = x$, whence rearranging and factoring gives $x(xy-1) = 0$. But as you noted in the first paragraph of your proof, $xy-1$ must be a unit, since if $xy-1 \in I$, then $1 \in I$, which contradicts $I \neq R$. Right multiplying both sides by $(xy-1)^{-1}$, we thus conclude that $x = 0$, the desired contradiction.
