How to add a second owner of a folder using terminal on Mac?

Found the answer (type this in Terminal):

sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder

Where 'Oleg' is a user name and 'somefolder' is a folder name in question.

The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le

Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.

That was the intention.

Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.

However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).