Yes it is possible to gain muscle while dropping fat.
It is important that we use the correct training methods and intelligent nutrition so that we stimulate muscle growth, even in a calorie deficit.