We consider the one-dimensional driven ABC model under particle-conserving and particle-nonconserving processes. Two limiting cases are studied: (a) The rates of the nonconserving processes are vanishingly slow compared with the conserving processes in the thermodynamic limit and (b) the two rates are comparable. For case (a) we provide a detailed analysis of the phase diagram and the large deviations function of the overall density, G(r). The phase diagram of the nonconserving model, derived from G(r), is found to be different from the conserving one. This difference, which stems from the nonconvexity of G(r), is analogous to ensemble inequivalence found in equilibrium systems with long-range interactions. An outline of the analysis of case (a) was given in an earlier letter. For case (b) we show that, unlike the conserving model, the nonconserving model exhibits a moving density profile in the steady state with a velocity that remains finite in the thermodynamic limit. Moreover, in contrast with case (a), the critical lines of the conserving and nonconserving models do not coincide. These are new features which are present only when the rates of the conserving and nonconserving processes are comparable. In addition, we analyze G(r) in case (b) using macroscopic fluctuations theory. Much of the derivation presented in this paper is applicable to any driven-diffusive system coupled to an external particle bath via a slow dynamics.