I have a old trek road bike with 2X9 setup. I need to change the front derailleur. Can I use a Ultegra fd-r8000?
My shifters is Shimano Sora.
Unofficially, I suspect that Sora shifters would pull the right amount of cable to actuate a front shift with an R8000 FD. I believe that FDs don't have as many compatibility issues as RDs. The problem with your proposed setup is that the R8000 FD is designed for a narrower chain than the one you have. It may not shift properly as a result. If you can't get a Sora FD, it's possible that you could hunt on eBay for another 9s Shimano FD.
If you are upgrading the bike piecemeal, I would ask again if that's necessary. It is definitely not cost effective to do that, as it will cost more than buying a bike that was originally specced with R8000. You will also have a low-end frame.