Hello,
Thank you for your question.
You need to have the Office 365 subscriptions which contains Office 365 ProPlus such as Office 365 ProPlus and E3 plans. Also use Office Deployment Tool to download and install Office is required. After configured, all the users can access this shared computer and user their Office 365 accounts to work online and local. Below is the two related articles for your reference:
https://technet.microsoft.com/en-us/library/dn782860.aspx
https://technet.microsoft.com/en-us/library/dn782858.aspx
Also, You can use Office 365 Enterprises E3 license to run Office on the RDS server. Here article for your reference:
https://technet.microsoft.com/en-us/library/office-applications-service-description.aspx
--If the reply is helpful, please Upvote and Accept as answer--