As long as the landlord hasn't given you proper legal notice that they will need to enter your apartment or home then yes you can refuse entry to your landlord.
For a landlord to legally enter the apartment or rental house the landlord must give you at least 24 hours notice before they intend to enter the home or apartment that you're renting from them.
Now if the landlord needs to enter the property for an emergency situation then you need to let the landlord in whether legal or not so they can assess and fix the problem.
A landlord doesn't have to give you proper notice to legally enter the place during an emergency but they do need to give you 24 hour notice to enter the property when it's not an emergency.