This is easy enough to do in the Outlook client by clicking the From drop-down box and selecting the appropriate account or entering an email address. It's not quite that intuitive in Outlook Web App (OWA), but it can still be managed.
First, you need to display the From field for the message you are composing in OWA. Click the [...] ellipses button and select Show From:
Next, right-click From the email address and select Remove:
Now type in the email address of the user or Office 365 Group you want to send the email as:
Of course you need to have rights to send as the user for this to work properly, otherwise you will get an NDR saying, "You don't have rights to send as this user."
Note that the sent item will go into your Sent Items folder, not the user's who you are sending as.