We consider the possibility of using Dirac's ideas of the deformation of Poisson brackets in nonholonomic mechanics. As an example, we analyze the composition of external forces that do no work and reaction forces of nonintegrable constraints in the model of a nonholonomic Chaplygin sphere on a plane. We prove that, when a solenoidal field is applied, the general mechanical energy, the invariant measure and the conformally Hamiltonian representation of the equations of motion are preserved. In addition, we consider the case of motion of the nonholonomic Chaplygin sphere in a constant magnetic field taking dielectric and ferromagnetic (superconducting) properties of the sphere into account. As a by-product we also obtain two new integrable cases of the Hamiltonian rigid body dynamics in a constant magnetic field taking the magnetization by rotation effect into account.