If you do the intermittent fasting correctly and follow through all the way with the intermittent fasting then yes you can both lose fat and build your muscles.
As long as you continue to do the weight training along with doing the intermittent fasting then you can keep building muscle as you lose the fat and weight that you desire.