Though reptiles are traditionally defined as a paraphyletic group, even when they aren't the monophyletic definition only includes them and birds (sauropsids). Mammals, including apes, are descended from another branch (synapsids) which aren't the ancestors of modern reptiles, though they are still called sometimes "mammal-like reptiles" because of the close relationship and relative similarity. The common group for mammals and reptiles would be amniotes. Having birds within dinosaurs allows for a monophyletic definition of dinosaurs which does include all birds and there's no other ambiguity.
In general, the farther you go back in time the less meaningful such statements are: "a cow is a fish, an eel is a worm, a butterfly is a bacteria..." because the ancestors of modern animals were closer and the classification is static. Dinosaurs just happened to be yesterday and leave nothing but birds - even then, an ape still isn't really a reptile.