You’re better off just casting with food safe resin. Keep in mind that virtually no resin is stable when heated unless you explicitly get a heat stable food safe resin.
Even “food safe” FDM runs the risk of contamination by mold and bacteria, since it’s quite hole filled even when it may look smooth. All it takes is one hole in the resin and you’ve got a recipe for contamination.
So, yes. It’s possible. Just keep in mind that you need to be careful. And if just make sure everything involved is food safe, even if it’s encased in the resin. Better safe than sorry.