No, the CAPM does not imply the error covariance matrix is diagonal. The distinction between systematic and idiosyncratic risk under the CAPM is not as simple as indicated at the start of the question. The CAPM considers expected values, not the covariance matrix. It implies that there is a single factor that is priced, i.e. it has something to say about the expected return. However, there may be other factors that that are not priced that make the covariance matrix nondiagonal.*
*This would be impossible in a market consisting of only two assets ($N=2$) but becomes possible in a larger market ($N>2$); see e.g. Petersen (2009) section "Asset Pricing Application" (end of p. 34 of the free version here).