Unfortunately no, you can dequeue the file as the other questions answer suggests and enqueue your own version, otherwise you'd need to load it and then try to modify the loaded code at runtime, which is almost always not feasible.
Monkeypatching might be a solution, assuming your code runs before theirs does, but is loaded after there's. But that is rarely possible. We're talking 1 in a thousand chance. This is where the original code is loaded, but before it's ran, your code swaps out functions and data structures. e.g. removing a jQuery plugin then putting your own in its place. This isn't possible in most situations though. Note that monkeypatching is widely considered a kludge, is not a longterm solution, and can cause issues on its own.
It's also possible that the author of the original file wanted their code to be extensible and built it that way. But this is unlikely. You would need to read the code to find out on a case by case basis.