Simply put it is possible to build muscle and lose fat at the same time, countless scientific studies have shown this. (See one study here)
Having said that, muscle growth certainly slows down during a fat loss phase. The stimulus of muscle growth during your training is still present, but you are not consuming enough calories to optimally support this process. So, if you are a more advanced lifter, you may not always notice the little amount of muscle you gain during weeks of dieting/cutting. This does not take away from the fact that muscles can grow while body fat is being reduced. You can get more out of a fat loss phase than just muscle maintenance.
The more experienced athletes can gain a little bit of muscle during a fat loss phase. (See one study here). However if you are very lean and/or close to your genetic muscular potential, it is very hard/almost impossible to do this.