The Brass Bottle (1964)
The Brass Bottle is a 1964 American fantasy film about a modern man who accidentally acquires a djinn. Though the word is commonly translated into English as "genie", author F. Anstey made a distinction between the two in the novel of the same name (originally published in 1900) which provides the basis of the film.
More at Wikipedia.