The lattice Boltzmann method (LBM) with an elastic model is applied to the simulation of two-phase flows containing a deformable body with a viscoelastic membrane. The numerical method is based on the LBM for incompressible two-phase fluid flows with the same density. The body has an internal fluid covered by a viscoelastic membrane of a finite thickness. An elastic model is introduced to the LBM in order to determine the elastic forces acting on the viscoelastic membrane of the body. In the present method, we take account of changes in surface area of the membrane and in total volume of the body as well as shear deformation of the membrane. By using this method, we calculate two problems, the behavior of an initially spherical body under shear flow and the motion of a body with initially spherical or biconcave discoidal shape in square pipe flow. Calculated deformations of the body (the Taylor shape parameter) for various shear rates are in good agreement with other numerical results. Moreover, tank-treading motion, which is a characteristic motion of viscoelastic bodies in shear flows, is simulated by the present method.