Whole-flat rental: not allowed during MOP
You cannot rent out your entire flat while serving MOP, regardless of your reason for moving out (posting overseas, temporary relocation, etc.) — this is one of the most commonly misunderstood MOP restrictions.
Subletting individual rooms: generally allowed
Renting out one or more bedrooms while you continue living in the flat yourself is permitted during MOP, subject to occupancy caps and registering the arrangement with HDB. This is different from renting out the whole unit and moving out entirely.
If you need to move out temporarily during MOP (e.g. an overseas posting), whole-flat rental isn't an option — you'd need to explore an exception application with HDB, which isn't guaranteed.
After MOP
Once MOP is complete, you can rent out the whole flat (subject to a minimum rental period and registering tenants with HDB) or sell it on the open market.