Which book?You could use a model in which the total mass ##M## of the solar system, including the sun and planets and anything else considered significant enough, is taken to be at the barycenter of the system, and all of the objects in the system are treated as point masses orbiting the barycenter. Such a model would not be exact, but it would be a reasonable approximation for many purposes.
For a perihelion shift calculation, however, such a model wouldn't necessarily be good enough, because the actual observed perihelion shift of any planet contains contributions due to the perturbations induced by the other planets that are much larger than the GR contribution that we are calculating here. And those perturbations depend on the actual relative positions of the planets, so a simple barycentric model with the total mass at the center won't correctly capture them.
For even more accurate calculations, one could use a framework like the Einstein-Infeld-Hoffmann equations, which also would use a barycentric coordinate system, but which are multi-body equations in which each mass is treated separately. As I understand it, a framework like this is how the perturbations of the various planets on each other are calculated.
For calculating the GR contribution itself, you are correct that it is a good enough approximation to just use the Sun's mass, because it contains the vast majority of the mass of the entire solar system and any GR corrections to the Newtonian effects of the other planets are too small to matter.
I'm not aware of any context where it would make sense to use Newtonian formulas but plug in the sum of just the sun's mass and the mass of one planet.