Generally speaking, yes. However, your lease agreement may require a written notice of intent to vacate. If you don’t provide the notice under those circumstances, you may be subject to a penalty from the landlord.
It depends on your lease agreement. If you fail to provide written notice in compliance with the laws of your jurisdiction, your landlord may have the right to charge you the following month’s rent or withhold your security deposit.
If your lease establishes specific requirements for a notice period before vacating a property, follow those requirements. Otherwise, 30 days or a full rental period (whichever is longer) is required by law. Those 30 days start when your landlord receives the notice, not when it is sent.
Once you deliver your notice, it constitutes a commitment to leave the property by the appointed date. The landlord does not have to allow you to stay in the property after that. But, you may be able to negotiate extra time past the notice date or even completely annul it if your landlord agrees to the terms. This is generally easier to do the closer you change your mind to the delivery date.