The viscoelasticity-induced migration of a sphere in pressure-driven flow in a square-shaped microchannel is investigated under inertialess conditions. The effects of fluid rheology, i.e. of shear thinning and normal stresses, is studied by means of 3D finite element simulations. Two constitutive models are selected, in order to highlight differences due to rheological properties. A strong influence of the suspending fluid rheology on the migration phenomenon is shown, by particle trajectory analysis. When the second normal stress difference is negligible and, as a consequence, no secondary flows appear, the particle migrates towards the channel centerline or the closest corner, depending on its initial position. As shear thinning is increased, the center-attractive region is reduced, and the migration rate is faster. On the other hand, the existence of secondary flows, linked to the existence of a second normal stress difference, alters the migration scenario. The competition between the particle-wall hydrodynamics interaction, promoting the migration mechanism, and the secondary flow velocity components gives rise to further `equilibrium' positions within the channel cross-section. Particles driven towards such positions trace out a spiral trajectory, following the vortex structure of the secondary flows. However, as the particle dimension is increased or the Deborah number is reduced, the cross-streamline migration velocity overcomes the secondary flow velocity. In this case, most of the particles are driven towards the channel centerline, i.e. a strong flow-focusing effect results.