Most websites don't allow you to modify files stored on them. You would need to download the file locally, edit it, and then find some way to upload your changes back to the site.
For OneDrive, you
might be able to use the API:
OneDrive file storage API overview - Microsoft Graph | Microsoft Docs[
^]
But if it's in the user's own OneDrive, then they probably have a local copy which will be synced to the web. You would just need to open and edit that local copy.