Adding muscle mass and losing fat are opposing processes. If you're gaining weight, you're gaining both fat and muscle. If you're losing weight, you're losing both fat and muscle. Except in cases of extreme obesity, it's essentially impossible to gain muscle mass and lose fat simultaneously. You can push the proportions one way or the other (gaining more muscle than fat or losing more fat than muscle), but gaining or losing body mass almost always entails either losing both fat and muscle or gaining both fat and muscle. If you want to both gain muscle mass and lose fat, you're going to have to tackle them in separate phases.
Losing weight is all about caloric intake. It doesn't matter how often or how hard you exercise - you can't outrun your fork. Believe me, I've tried. If you want to lose weight, you're going to have to limit the calories you eat. This doesn't mean you need to eat magic foods or the "right" foods. It doesn't mean you can never again eat at Five Guys. You just need to track your calories and your weight and then adjust your daily calorie limit until you're seeing sustained weight loss. You can eat pizza and cheeseburgers and hot dogs and you'll lose weight, so long as you accurately track and limit your caloric intake.
To gain muscle mass, you need to be doing strength training and you need to be eating enough protein to support muscle growth (typical recommendation is 1g of protein per pound of body weight per day). You also need to be eating at a surplus to enable gaining body mass. You also need to get adequate rest, which entails rest days and adequate sleep every night. The best way to gain strength is with compound barbell lifts. If your apartment gym doesn't have a power rack and a barbell with plates, I would request that they get them. If necessary, find a gym that does have them. I recommend running a novice linear progression with the main barbell lifts (squat, deadlift, press, bench). If you need guidance on how to run such a program, check out Starting Strength, Barbell Logic, or Andy Baker's material. If you run a NLP for 6 months using 3 sets of 5 on the main lifts and adding weight every session according to the program, and you're eating enough and sleeping enough, then you will easily put on 20lbs of muscle mass in that time. And it will show.
You can tackle these two things (losing fat and gaining muscle) in any order. You can lose the fat (and some muscle) first through diet and then start your strength training program. Or you can start the strength training program, gain 20lbs of muscle mass, and then shed the fat.
I recommend starting the strength training first. I think this is the better option, because it's easier to lose the fat when you have the extra muscle mass burning calories. It's also easier to go from 160lbs to 180lbs of lean body mass and then hold onto that while you lose fat than it is to drop from 160lbs to 150lbs of lean body mass and then try and gain it back. Gaining weight is easier than losing it. Gaining muscle helps you lose fat in the future. Also, consistently putting more weight on the bar each workout is way more motivating in my experience than watching the scale bounce around over the course of a weight loss regimen.
It's also worth noting that you can gain muscle and fat and still have your bodyfat percentage drop. If you start with 25% bodyfat and then gain 16 lbs of muscle and 4 lbs of fat, your bodyfat percentage still dropped even though you gained some fat. So it's entirely possible that, after adding 20-30lbs of mostly muscle, you might be so happy with how your body looks after your NLP that you decide to forego a cut and just keep training.
I was (still am) in your boat, only to a much greater degree. At my peak, I weighed 370 lbs with a bodyfat percentage around 50%. I bought a rowing machine and did high intensity interval training six days a week for several months, and I dropped some weight. But I quickly plateaued. I couldn't break past 340lbs, and the HIIT was keeping my appetite up, which made restricting calories hard (I also wasn't tracking very closely). I started out rowing 6 days a week, but I had to start reducing that until I was down to just 3 days per week because I just couldn't keep up that frantic pace. Then my rowing got derailed by life events and I stopped doing any kind of training and gained some of the weight back over the next several months.
Last spring, I started following the Starting Strength Novice Linear Progression. Bought a rack, a barbell, some plates, and started doing the program in March. I started out at a bodyweight of about 345lbs. My starting numbers were 135lb squat, 135lb deadlift, 65lb press, and 75lb bench. Eating roughly at maintenance (because I had such a fat surplus), after six months my squat had increased to 275lbs, my deadlift to 330lbs, my press to 115lbs, and my bench to 190lbs (still to fat to do a chin-up). I was addicted from the start - seeing 5 more pounds on the bar every single session for weeks and months on end wasn't just motivating, it was life-altering. I never thought I could do anything to dramatically change my physique or my abilities, and that program proved me wrong.
Then in February this year, I started doing strict calorie tracking in order to start shedding fat. I've lost some muscle mass, too, and some strength, with my deadlift down to 265lbs, my squat down to 205lbs, and my bench and press holding pretty much stagnant. But I've lost 70lbs, 10 inches off my waist, and dropped from 45% to 30% bodyfat since February. I have to keep doing small resets, but I'm still able to keep pushing the weights up slowly in between those resets. The barbell training is really what got me on that path, and it's helped me stick to my calorie limits - I don't think I could have done it without the barbell training. It's much easier to stick to a diet when you have training goals to meet than it is to just limit calories with no goal other than weight loss. The barbell training gave me a tangible result that I could see every day that I trained, and that really motivated me to stick with it. Even if the weight on the scale stayed the same from one day to the next (or increased due to inflammation after training or water weight after eating carbs), I was still able to point to the weight on the bar as progress.
So, you're definitely not in as dire straits as I was, and you probably don't have as much fat to lose as I still do, but I really think you would benefit from starting the barbell training now and wait until later to worry about cutting fat.