## 1 Introduction  
Nowadays, the development of modern technologies requires access to stable and reliable sources of raw materials. This is also the situation related to the production of electronic devices and the development of clean energy technologies, and the defense, optics, automotive, agriculture, medicine, and energy industry, among others [1], where one of the most important raw materials are rare earth elements (REEs). Especially due to their unique chemical, catalytic, physical, magnetic, and luminescent properties, they are used in an increasing range of modern products and technologies [1; 2]. They are obtained from the ones of these metals, the main deposits of which are in China, which has close to a monopoly on their production [1]. In addition, their production is carried out using conventional mining techniques, which, in turn, is associated with significant energy consumption and the generation of huge amounts of toxic waste and acidic sewage. Therefore, it is extremely important to search for new sources of these elements, especially considering the requirements of the closed-loop economy and the need to reduce the amount of industrial waste and use them as secondary sources. In the case of REEs, coal fly ash can be an excellent source due to their presence in the ash composition, the availability of this waste product, and the need to reduce numerous problems related to its storage [2; 3]. Many chemical, physical, and biological methods are used for the recovery of REEs from coal fly ash [4; 5], the most promising of which are chemical methods based on the extraction of REEs using various extracting solutions, such as HCI, HNO\({}_{3}\), H\({}_{2}\)SO\({}_{4}\), or NaOH [2; 3; 4; 5; 6; 7]. Using these methods, extracts of complex composition, extreme pH, and high concentrations of other components of the coal fly ash matrix (Al, Si, Fe) extracted together with the separated REEs are obtained [8]. In addition, the recovery of a mixture of many REEs can also be problematic due to their chemical similarity and potential problems with their separation. Therefore, it is important to introduce highly selective methods, such as membrane and adsorption techniques [9], based on advanced materials that can work in extreme environments [10; 11; 12; 13]. For the separation of REEs from extracts, various membrane techniques were used, such as reverse osmosis (RO), nanofiltration (NF), emulsification liquid membrane (ELM), and hollow fiber liquid membranes (HFLM) based on various types of membranes [14; 15; 16]. REE enrichment above 90% was obtained for all membrane-based techniques. However, there are still many issues that need to be resolved, such as limited efficiency, fouling, and the short life of membranes. Despite these issues, the membrane techniques are a good alternative to conventional methods (ion exchange and chemical precipitation) for separating REEs from extracts and have the potential for further development in the future, especially based on advanced materials with high selectivity and affinity for REE ions. In recent years, polymeric materials operating on the principle of a lock and key mechanism, imitating the action of natural receptors such as antibodies or enzymes in biological systems, have become highly promising in the recovery of trace amounts of various compounds [17]. For this purpose, molecular imprinted polymers (MIPs) or ion-imprinted polymers (IIPs) are used, containing cavities in the polymer matrix matching the structure of the target substances. These materials are highly selective and can be used to concentrate or recover target compounds from samples with complex matrices. They can be obtained by the imprinting technique, during which a template molecule or ion is dissolved in a suitable solvent, the so-called porogen, together with functional monomers (capableof polymerization), between which a pre-polymerization complex is formed.