The origin of gas in extended narrow-line regions of nearby Seyfert galaxies – I. NGC 7212