Yes it is possible.
AAS promote muscle/weight gain, and fat loss. In conjunction with cardio and proper eating habits, and if your calories are clean you can indeed gain weight and lose fat. However, my commentary here is simplistic whereas the process and necessary knowledge are both complex and expansive respectively.

Thus, it is far easier to choose bulking or cutting and proceed accordingly.