It is definatley possible, though I think a lot of it is determined by genetics and your newness to training. Anyone who is a virgin to weight training can build muscle while losing fat. The first year is usually like this for just about everyone. However over time this phenomenon subsides and you won’t notice much of it as you get more experience.
If it were truly that possibly then none of the pros would ever have to bulk. Once you reach a certain level of training I don’t think you’ll see much in the way of LBM gains while dieting. And remember skinfolds and bodyfat measurements are highly deceiving. If you need proof then take a bodyfat test via skinfold. Now figure out your amount of LBM from those measurements. Now guzzle a gallon of water and recheck your bodyfat. Skin folds are the same but now you have 5 more lbs of LBM! That’s because water counts as LBM therefore hydration fluctuations can give false hopes. Remember that when you gain 10 pounds in 2 weeks of your bulking cycle. No one can gain 10 lbs of muscle in 2 weeks even with roids, a lot of that is water but it shows up as LBM therefore we like to “think” we’re gaining muscle that fast.
So the point is, yes you can gain muscle while dieting but the farther along your training is the less and less you will see this. Newbies will do it without even trying.