These users do not necessarily need an office 365 account.
You can enable anonymous access for them and invite external users to visit your site, but they need a Microsoft account. When you share your site with external users, they will receive an email prompting to log in with a Microsoft account or a work or school account in Azure AD from another organization.
Information about External sharing:
https://learn.microsoft.com/en-us/sharepoint/external-sharing-overview
Sharepoint online subscription information:
https://www.microsoft.com/en-us/microsoft-365/sharepoint/compare-sharepoint-plans
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.