13 hours ago
Will there be any harm if I install sudo from Ubuntu 20.04 or sudo from Ubuntu 18.04 on my Ubuntu 18.10 system?
There is no official sudo upgrade offered for Ubuntu 18.10.
(Why I need 18.10 is complicated)
20 hours ago
Ubuntu 18.10 went end of life on 19 July 2019 and so is offtopic here, and is also a really bad idea to be running as it doesn't receive security updates, as you have noticed.
It would not be a good idea to forcibly install a sudo package from another version of Ubuntu. You would be better off:
But upgrading to a supported release is a better idea than all of the above.