How can I hide an app from the dock while keeping it in the menu bar?

Solution 1:

I want to know if there's a way to hide the app from my dock when the app is running so that I can simply use the menu bar to see if I have any new messages and thus save dock space

An app can be configured to hide it's Dock icon, and show it only in the Menu bar, only if it is designed (programmed) to provide this functionality. If the app doesn't include this feature, it's not possible for user to achieve this by any other means (OS built-in or using any 3rd party tool).