Yes, this can be done. I'm part way through a similar project and have simple test cases working - sometimes.
You don't mention your JS skill level. IMO, this is not a beginner project. I am a JS novice, but have worked a lot with Autocomplete projects for a couple years. The similar project I'm working is do-able, but difficult and slow for me. I do a lot of research and run down a fair number of dead ends.
The Autocomplete source: option takes a function. That function can be as complex as you want. In a gross over-simplification, you want to build 2 methods for getting data, compare and delete overlap, and then merge the 2 remaining arrays.
If you have not built a remote data Autocomplete, you may find the information that I posted a while ago at this link useful. If you do the project, start small and simple, then add complexity.
https://forum.jquery.com/topic/autocomplete-how-to-use-mysql-data