I'd like to fetch mails from a server, but I also want to control when to delete them.
Is there a way to do this?
I know this setting is very usual in mail clients, but it seems this option is not well supported by POPv3 specification and/or server implementations.
(I'm using python, but I'm ok with other languages/libraries, Python's poplib seems very simplistic)
POP3 by design downloads and removes mail from a server after it's successfully fetched.  If you don't want that, then use the IMAP protocol instead.  That protocol has support to allow you to delete mail at your leisure as opposed to when it's synced to your machine.
Fetch mails via POP3, but keep them on the server