A fire extinguisher is not legally required in the apartment itself. However, fire extinguishers are mandatory in common areas of the building if it higher than 2 floors and was built after 1994. For older apartment buildings there is no curent legal regulation, but it is nevertheless highly recommended to provide sufficient fire protection. Always check your fire insurance to make sure it does not require any specific measures.
For more information on how many fire extinguishers you need, please refer to our extensive article How many and which fire extinguisher units do I need for professional use and apartments?