We obtain and analyze equations determining first-order differential symmetry operators with matrix coefficients for the Dirac equation with an external electromagnetic potential in a (2+1)-dimensional Riemann (curved) spacetime. Nonequivalent complete sets of mutually commuting symmetry operators are classified in a (2+1)-dimensional Minkowski (flat) space. For each of the sets we carry out a complete separation of variables in the Dirac equation and find a corresponding electromagnetic potential permitting separation of variables.