The targeting precision of proton therapy is expected to benefit from real-time MRI guidance. We developed a setup of a first prototype in-beam MRI scanner with a proton pencil beam scanning nozzle. Dipole magnets in the nozzle used for beam steering produce time-dependent magnetic fringe fields that may interfere with the MR image acquisition. In this study, we show that vertical beam steering shows no degradation of the MR image quality, whereas horizontal beam steering introduces severe ghosting artefacts in phase encoding direction. The origin of these artefacts is unraveled and strategies to eliminate or correct these artefacts are proposed.