Highly unlikely that a mismatch between the rim width and tire width is causing flats. I would hope that if your rim was too wide for a 23mm tire and would not seat properly the bike shop would not have installed it.
Note that on a trainer you have a much greater margin of error with tire sizes because the rear wheel isn't taking very much radial load, and no lateral load.
The first thing to check for if you are getting frequent punctures is a problem with the rim tape exposing the spokes or nipples or another sharpe surface inside the rim, or a foreign object embedded in the tire that is abrading the tube. As you have a new trainer tire that has never been ridden on the road the latter should not be the case.
Lining the tire logo up with the valve and keeping track of where punctures occur on the tube can help track down the location of whatever is damaging the tube.
You say that you are getting flats, but not specifically punctures. If the tube is just deflating either a small slow puncture or a faulty valve is likely the culprit.