There’s some evidence that increasing protein intake alone triggers muscle gains in untrained people who were previously not consuming much.
In one study on untrained, skinny-fat women, consuming 115 grams daily for 12 weeks lead to almost three pounds of muscle gain (and some fat loss) compared to women eating the same number of calories (maintenance) but only 69 grams of protein daily. None of them lifted weights before or during the study.
So, while dieting without resistance training is definitely not ideal (muscle loss, metabolism dysruption, fat overshooting, etc.), it’s technically possible to gain some muscle by just increasing protein intake, at least in low-protein eaters.
So, I guess the big question is this: how much muscle did the person lose while dieting for fat loss? My guess is that the muscle gained from increasing protein may not be enough, so lifting is always the best option. ABL: Always Be Lifting. And of course, diets with a lot of protein are superior to diets with less protein. That would prevent most, if not all, of the muscle loss to begin with.