Genie

Genies were large legendary humanoids with great magical powers, said to grant wishes to the master of the object in which they were imprisoned.

When the Third Doctor produce an oil lamp as a solution to one of his problems, Sarah Jane Smith joked he was going to "rub it and produce a genie". (TV: Death to the Daleks) The Seventh Doctor compared Fenric's predicament trapped inside a flask to "a genie in a bottle". (TV: The Curse of Fenric)

A genie's magic lamp was one of the props stored in an old pantomime theatre prop-room, (COMIC: It's Behind You!) and Aagenie was a character in the movie Aladdin (PROSE: The Christmas Cracker Conundrum!)

At least one genie was real, originating in another realm than the Doctor's. He was accidentally "snatched" from his realm by something the Thirteenth Doctor did based on a link she'd clicked on Spacebook, with his real lamp switching places with the prop one. The Doctor rubbed the lamp and summoned him, using the first of her three wishes to get him to send away all the other, more dangerous fictional beings the Spacebook link had summoned. She used the second to give everyone in the theatre ice cream at Dan Lewis's suggestion, including the genie. (COMIC: It's Behind You!)