Yes. Although it's usually not worth it for us, since our lower constraint is the motor casing. Adding thickness to the forebody and a wasp waist on the fins would accomplish this, but at the expense of substantial additional body skin drag.
Edit: it would also look really cool, esp. w/ a toploaded DMS + sub-MD boattail.
One additional comment on this, although it does not relate to rockets: The really clever aircraft designs actually apply this in two different planes. The first, what we usually associate with this "transonic area rule", is where it is applied in a direction normal to the flight direction.
Richard T. Whitcomb conceived this idea as early as 1951, while at NACA. I helped the ability of the Convair F102 to break Mach 1.
If it is applied a second (or more I assume these days) time to the oblique surface formed by the Mach cone at supersonic cruise the aircraft is even more efficient. The F-16 is an example of this being applied from early on in the design process.
This supersonic area rule was conceived by R.T. Jones (NACA) and first published in 1953.
Smooth transitions between regions are also an important part of the application of both these rules.
One would typically design rockets to not hang out for a while in the transonic region. It's a different optimization problem than a plane cruising near mach, +/-. Our rockets would either punch through mach to go quite a bit faster (high performance minimum diameter rockets), getting back down to transonic and subsonic at higher altitudes where drag is lower, or they don't go through mach at all (lower powered or lower performance big dumb rockets and similar). If one takes the gloves off, one can design rockets which would approach M5 for a single stage, and not make it back to transonic until up around 100Kft or so where it just won't matter. But they'd melt on the way up, and definitely wouldn't be using commercial motors. I've simmed such rockets in RasAero using motors that would survive static test but are not the usual designs. There are a few tricks. But the casing couldn't take the external heating along with the internal. It might not fail getting up to speed because that happens quickly, (but it might anywhere past M3), but it won't survive at speed unless I can come up with an economical way of making it take some more heating.
For a high performance rocket, at least from my sims, a doubling of fin thickness at the root would only cost a few thousand feet as long as the shape is suitable for the speeds. Base drag for the rocket will be a greater drag source, once the motor shuts off.
Here's Jon Champion's chapter 8 on area ruling. Although not in this chapter, elsewhere he says he doesn't think it's worth the effort. Although I don't have the experience to validate, I agree with G_T "Base drag for the rocket will be a greater drag source, once the motor shuts off." Tail cone or boat-tail will improve altitude. View attachment 311564