We present direct numerical simulations for the flow of an Oldroyd-B fluid around a stationary cylinder using an extended finite element method (XFEM) combined with the DEVSS-G/SUPG formulation. In this method, the finite element shape functions are extended through the partition of unity method (PUM) by using virtual degrees of freedom as enrichment for the description of discontinuities across an interface. For the whole computational domain, including both fluid and rigid body, we use a regular mesh which is not boundary-fitted. The fluid domain and the rigid body domain are fully decoupled by using the XFEM enrichment procedures. The no-slip boundary condition on the interface between fluid and rigid body is realized by using constraints implemented with Lagrange multipliers. The accuracy and convergence are verified by comparing the solutions with those of simulations using a boundary-fitted mesh. The results are also compared with those obtained by using fictitious domain methods. Our method shows a significant improvement of local accuracy around the cylinder when compared with the fictitious domain method, obtaining solutions similar to those of boundary-fitted mesh solutions.