Can I access iCloud Drive files from non-apple device?

CloudKit

Apple offers CloudKit, which achieves something very similar to what you are describing.

If you're able to write an application both for your Mac and iOS device, you can sync data and files across devices relatively easily. For example, CloudKit allows you to store files and data in a free database, process it however you want in your apps, then re-upload it to the database. All of this happens without any explicit authentication.

The CloudKit framework provides interfaces for moving data between your app and your iCloud containers. You use CloudKit to take your app’s existing data and store it in the cloud so that the user can access it on multiple devices. You can also store data in a public area where all users can access it.

CloudKit | Apple Developer Documentation

Keep in mind that while CloudKit itself free and easy to use, there is a caveat; You have to have a paid Developer account, which costs $99 a year.

I would highly recommend you look into CloudKit and check out Apple's (outdated) CloudKit Quick Start guide to get a feel for how programming for it actually looks.

Access from Non-Apple Platforms

While CloudKit works best when used on an Apple device, it is certainly possible to interact with a CloudKit container with more platform agnostic methods.

The best solution may be to use CloudKit web services. This allows you to use either more traditional HTTP methods or JavaScript to interact with CloudKit data.

The part of CloudKit web services that has more up to date documentation is CloudKit JS, a JavaScript API for CloudKit.

Keep in mind that with either of these options, Apple says that, “You must have an existing CloudKit app and enable web services.” Details on how to setup CloudKit web service are in the linked CloudKit JS guide