I have done CMMC3 waterfall development, though the maturity model certainly did not dictate that. I have also seen agile done in the way you describe. I have also been on teams and run teams that used agile ceremonies to foster communication and teamwork and set a cadence, while long term planning was going on elsewhere. The two are not mutually exclusive, and even mediocre agile is miles better for delivering working software than bad waterfall.