I wrote a free adaptation for a short story back in university and I'd like to rewrite it, in order to make something that would be all my own, beause I really like the story I ended up with. The fact is that I really didn't stick to the written text and invented many new details. I really liked the themes and setting, which I'd like to keep in a new story, and I am afraid that it might be seen as some form of copyright infringement. Would "Inspired by a story from..." or something like that be a possible course of action? Should I try to get the authorization from the rights owners instead?
Unless it's a selling point that you're adapting a specific book or property, I'd stay away from writing anything that requires rights. By the time you finish adapting most material into a movie, it's not the same material any more. If you haven't talked to the rights owner at that point, you're free and clear. If you have, you're in a bind, and if you have a contract, you're stuck.
The reason to get the rights would be that the property itself is a major selling point (e.g. GAME OF THRONES, a best-selling series of novels); or if the material is so unique and so cinematic that anything but a faithful adaptation would make a worse movie, not a better one. For example, John Grisham writes novels that are already so made-for-features that even if they weren't best-sellers, you'd be crazy to adapt one loosely.
I can't, of course, answer the question "is my adaptation loose enough that I can steal the idea?" That requires a copyright lawyer, and even there, the answer is probably "if you have to ask, then you can't." If someone reading your screenplay would say, "Hmm, this reminds me vaguely of X, did you ever read it?" then you're probably okay. But I am not a lawyer, nor is this legal advice...