
Based on your query, you can use Office online server to view office documents from browser. However, If you need edit options, you need to have commercial license. See the below text from the licensing document.
"
Microsoft Office Online Server offers view-only access to Office documents on an Internet browser. For
editing of Office documents, you need Software Assurance for an Office suite license acquired through
Commercial Licensing. The single primary user* of an Office licensed device can edit documents using Office
Online Server from any device, including those not licensed for Office. External users** don’t need an Office
suite license to view or edit Office documents on an Internet browser."
Refer ther licensing guide here: https://download.microsoft.com/download/3/D/4/3D42BDC2-6725-4B29-B75A-A5B04179958B/Licensing_Microsoft_Office_Software.pdf