Neutral and charged shallow donor states confined by a parabolic potential in the plane of a GaAs quantum well are studied in the presence of a perpendicular magnetic field. The influence of the position of the donor on the energy of the states is studied, i.e., we consider both the cases when the donor impurity is on and off the center of the dot. We investigate the dependence of the ground and excited states on the confinement potential and on the presence of an external magnetic field. Two different theoretical approaches are used: the finite difference technique and the fractional-dimension method. We found that if the donor is displaced from the center of the quantum well, the presence of the lateral confinement shifts the magnetic field-induced angular momentum transitions and the unbinding of the charged donor state to a lower magnetic field.