I want to give my apartment to my neighbor. Can the municipality exercise its pre-emption right?

Yes. Donations escape pre-emption only when made to ascendants, descendants, or relatives up to the 6th degree (Urban Planning Code, Article L213-1-1). Unless your neighbor is related to you and the property lies in a pre-emption zone, the municipality may pre-empt.