We always use biocompatible materials for foods and health matters, no matters what the size is. Nanomaterials are the scale down of bulk materials. Their size is scaled down to improve their performance. If a material is biocompatible in its bulk scale, it is definitely biocompatible in its nanoscale too.
This is a good example of how nanomaterials, amyloid fibrils made from whey proteins in this case, are used for water purification:
https://www.nature.com/articles/nnano.2015.310
Fundamentally these beta lactoglobulin amyloid fibrils are self assembled proteins, which possess a great capacity in hosting a range of heavy metal ions.
Another example is dendrimers, especially OH-terminated PAMAM dendrimers, for sequestration of toxic metal ions and environmental pollutants like phenanthrene and pyrene, etc.
Article PAMAM Dendrimers and Graphene: Materials for Removing Aromat...
Nice and most important question which i think is bit ignored due to advancement in nanotechnology. It must be looked and ecotoxicity needed to be inquired in depth.