While an Access database file can be shared over OneDrive, it's very important that only one person have it open at a time to prevent risk of corruption and data loss.
Whenever you open a database file in access, a separate small lock file is created with the same name as the database, but with a different file extension. That lets other copies of Access know the file is in use elsewhere and whether it can be shared. If you open the database in "exclusive" mode, the lock file will tell the other copies of Access that the file is being held for exclusive access and they won't be able to open it until the database is closed on the other PC and the lock file is deleted. It's important that every copy of Access open the file in exclusive mode when using OneDrive to prevent simultaneous use and risking file corruption or data loss.
The reasons why you can't use OneDrive for simultaneous file access is a bit more technical, but I'll do my best to make it understandable...
When on a local office LAN, a server or one of the workstations can expose a file share to the network that lets other users on different machines see and interact with files on the server's hard drive directly. When multiple users open an Access database file over one of these local file shares, they are all interacting with the same copy of the file. Access doesn't even need to copy the entire file over the network as it can reach in and only grab the pieces of the file it needs at that moment. This is because local windows file shares are based on what is called Block Storage where a file is broken up into many different blocks that can all be accessed independently. Access can also modify parts of the file in real-time so other users who read that block see the changes right away.
In contrast, OneDrive is based on what is called Object Storage which typically only deals in whole files. It works a lot like dropbox where files on the server are all copied down to your local PC's hard drive and a program running in the background keeps your local copy synced. When you interact with those files, you're only interacting with your local copy. If you make any change to the file, the entire file needs to get uploaded to the server so that it can get re-downloaded and synced with the other PCs that share the OneDrive. This is why you can still use files in your OneDrive while you are offline or on a slow connection.
So while it's possible to allow multiple users to open the same Access file on a one drive at the same time, things can go wrong very quickly if two people make changes in the file at the same time, or one person makes a change after someone else before the new copy of the file has synced. To be safe, this scenario should be avoided entirely. If multiple people outside of a single LAN need to access the same database simultaneously, move to SharePoint where only the web server can modify the main file and the users simply interact with web forms.