If he's not moving around and seems very lethargic, popeye is probably a symptom of a larger problem in his tank. Do you have a water test kit that tests for ammonia, nitrites, and nitrates? If so, please test the water and post the results here. If not, you can take a cup of water from his tank to the pet store and they will test the water for you. Post the results here. We are looking for actual number for ammonia, nitrites, and nitrates. If the pet store says your water is "fine", don't settle for that answer. Get the actual numbers. Also, take a sample of straight tap water, and have them test that, too. So that you know if there's anything toxic in your tap that you need to detox for.
It’s okay to put directly in the tank?
No. Dissolve the salt first. Take some of his tank water out of the tank and dissolve the salt in that, then pour the water with the dissolved salt back into the tank. Raw undissolved salt can and will irritate your betta. One way you can do this is with a water change; dissolve the salt in the new water before putting it in his tank.
Whether you use salt or not, fresh, clean water is a good general cure-all tonic for bettas. During this time that he's got popeye, change at least 50% of his water every second day. There's no such thing as too many water changes, and clean water is the best medicine of all. Just make sure you are using a dechlorinator when preparing his new water, don't just use straight tap water.
If you do use salt, understand that water changes will remove some of that salt, so you need to replace the salt you removed, but only the salt you removed. Do one full dose of salt for the initial dosing, then with each 50% water change add a half-dose of salt. Do this for one week, then stop adding salt, but keep doing 50% water changes every second day. You only want him to have salt for one week, but you want to keep giving him water changes every second day until the popeye is completely gone.