Hint $\ $ If $\,1\,$ is the only unit then $\,-1 = 1\,$ so the ring is an algebra over $\,\Bbb F_2.\,$ With that in mind, it is now easy to construct many examples.
Such commutative rings - where every element $\ne 1$ is a zero-divisor - were called $0$-rings by Paul M. Cohn. Clearly they include Booolean rings, i.e. rings where every element is idempotent $\,x^2-x,\,$ since then $\,x(x-1) = 0.\,$ Kaplansky asked about the existence of non-Boolean $0$-rings. Paul M. Cohn answered the question in Rings of Zero-divisors. There he gave a simple proof that every commutative ring R can be embedded in a commutative ring S such that every element is either a unit of R or a zero-divisor (and if R is an algebra over a field F then so is S). The proof shows further that every proper ideal of R survives (remains proper) in S, with nontrivial annihilator. Cohn then proceeded to prove
${\bf Theorem\ 3\,\ }$ Let $R\,$ be an algebra over $F$ in which every element not in $F$ is a zero-divisor. Then $R$ is a subdirect product of extension fields of $F,\,$ and every $\,x\in R\,$ which is not in $\,F\,$ is transcendental over $F$, except if $\,F = \Bbb F_2$ and $\,x\,$ is idempotent. Moreover, if $R$ has finite dimension over $F$ then either $R=F$ or $R\,$ is a Boolean algebra.