No filmmaker wants audiences to know the ending to his film noir ahead of time, but when the movie's based on a book, it can't be helped. Unless you're Oliver Stone. The supercharged director has his dander up over a May '97 Ballantine Books pub date for the thriller Stray Dogs, which he fears will sabotage his movie version, starring Sean Penn and Claire Danes and not due until the end of the year.

So what's behind the director's latest conspiracy theory? John Ridley, now 30, wrote Stray Dogs as a novel in 1990 and a screenplay in 1991, but publishers were indifferent to the project until Stone optioned the screenplay last summer. ''They bought it on the basis of Oliver's making it into a movie,'' says Stephen Rivers, Stone's spokesman.

Nonsense, says Ballantine editor Peter Borland, who acquired the novel late last summer for around $100,000: ''That signaled there was something here worth taking a look at, but most books that are optioned never get made into movies.'' Though Ridley's contract with Stone called for both sides to make a good-faith effort to coordinate the book with the movie release, the author acknowledges that he really has no control over the matter. Explains Borland of Ballantine's strategy: ''I want to set this up with booksellers and readers as a novel on its own merits. If you publish strictly as a tie-in, there's a perception that it's a novelization.''

The situation has poor Ridley more conflicted than the title character in Nixon. ''Oliver Stone has been very good to me,'' he says, ''and I hope we can work something out.'' But Ridley has been banned from the Dogs sets, and he worries that Stone is distancing himself from Ridley's directorial debut, Cold Around the Heart, even though he executive-produced it. Ballantine is forging ahead with plans for a paperback movie tie-in. ''But why would Stone work with them,'' asks Rivers, ''after the way they've behaved?''