This answer is inspired by the discussion at this questionat this question. Let $X$ be an integral affine scheme admitting an open cover $X=U\cup V$ with $U$, $V$ and $X$ all distinct. I claim that $\mathscr O_X$ is not projective in $\operatorname{Mod}(\mathscr O_X)$. Let $i\colon U\hookrightarrow X$ and $j\colon V\hookrightarrow X$ be the inclusion morphisms. There is an obvious surjection $p\colon i_! \mathscr O_U\oplus j_! \mathscr O_V\twoheadrightarrow \mathscr O_X$ (check surjectivity on stalks). If $\mathscr O_X$ were projective, $p$ would split, so we would have $\Gamma(\mathscr O_X)\hookrightarrow \Gamma(i_!\mathscr O_U)\oplus \Gamma(j_! \mathscr O_V)=0$, a contradiction.