Noncommutative ring with eight elements and with unity

I'm a bit confused about an exercise I read. Namely, T. Y. Lam's A First Course in Noncommutative Rings has the following on page $23$ Ex. $1.10$.

Let $p$ be a fixed prime. Show that there exists a noncommutative ring (with identity) of order $p^3$.

Well, this implies that there is a noncommutative ring with identity of order $8<16$, which contradicts with benh's answer given in smallest non commutative ring with unity . So have I understood correctly that there is a mistake in Lam's exercise?

-
Upper triangular matrices with entries in $\mathbb{F}_2$. His answer is wrong. He assumes that every nonzero element of the ring is invertible. Obviously if this were the case then there would be no noncommutative finite rings... –  Jason Polak Dec 25 '13 at 22:53
I am so sorry that I have caused so much trouble with my wrong answer... –  benh Dec 25 '13 at 23:22
@benh don't worry about it, mistakes happen to everyone. –  Olivier Bégassat Dec 25 '13 at 23:25

Indeed, there is a noncommutative ring with unity of order $p^3$ for all prime $p$. Though I have not read benh's proof, it must have an error of some form. I will not bother to repeat the argument. See this paper for many various constructions related to your question as well as the proof that there is a noncommutative ring with unity of order $p^3$ for all prime $p$.
$(n-1) \times (n-1)$ matrices over ${\mathbb Z}_p$ of the form $a I + C e^T$ where $a \in {\mathbb Z}_p$, $C \in ({\mathbb Z}_p)^{n-1}$ (as a column vector) and $e^T = [1,0,\ldots,0]$ form a noncommutative ring (with identity) of order $p^n$. Thus for $n=4$ the matrices are of the form $$\pmatrix{a_1 & 0 & 0\cr a_2 & a_3 & 0\cr a_4 & 0 & a_3\cr}$$
Here $p$ is an integer $\ge 2$ (not necessarily prime) and $n$ is an integer $\ge 3$. It is noncommutative because e.g. $$\pmatrix{0 & 0 & \ldots\cr 0 & 1 &\ldots\cr \ldots & \ldots & \ldots} \pmatrix{0 & 0 & \ldots\cr 1 & 0 &\ldots\cr \ldots & \ldots & \ldots}= \pmatrix{0 & 0 & \ldots\cr 1 & 0 &\ldots\cr \ldots & \ldots & \ldots}$$ while $$\pmatrix{0 & 0 & \ldots\cr 1 & 0 &\ldots\cr \ldots & \ldots & \ldots} \pmatrix{0 & 0 & \ldots\cr 0 & 1 &\ldots\cr \ldots & \ldots & \ldots}= \pmatrix{0 & 0 & \ldots\cr 0 & 0 &\ldots\cr \ldots & \ldots & \ldots}$$