Yes, it is possible to create your own Active Directory (AD) and sync it with Office 365. This is a fairly common setup when setting up a new branch office.
To do this, you will need to install and configure your own AD server and then set up synchronization with Office 365 using the Azure Active Directory Connect tool. This will allow you to keep user accounts, passwords, and other information in sync between your local Active Directory and Office 365.
It's important to note that you will need to have an appropriate Office 365 subscription plan in order to sync an on-premises Active Directory with Office 365.