There seems to be programs that can do that. I found this with google. I don't know if it works.
DLL to Lib - Convert DLLs into static libraries[
^]
UPX is not a good protection against reverse engineering, since UPX-packed programs can be unpacked by UPX itself and can also be easily recovered by debuggers/dumpers.
Unmodified UPX-packed programs are often recognized as such and unpacked by anti-virus programs.
(Source: Wikipedia)
So the probability is high that this is actually a virus.
I would recommend uncompressing.
07.02.2022
The now modified requirement states that the DLL should be included in the executable file.
Here is a possible Solution for this:
library that can be used to load a DLL completely from memory.
GitHub: MemoryModule is a library to load a DLL from memory.[
^]