Consider a stabilizer state on $n$ qudits, each of dimension $D$ with $D$ being a prime or a squarefree integer, divided into three mutually disjoint sets or parts. Generalizing a result of Bravyi et al. [J. Math. Phys. textbf{47}, 062106 (2006)] for qubits (D=2), we show that up to local unitaries on the three parts the state can be written as a tensor product of unentangled single-qudit states, maximally entangled EPR pairs, and tripartite GHZ states. We employ this result to obtain a complete characterization of the properties of a class of channels associated with stabilizer error-correcting codes, along with their complementary channels.