Do invertebrates (like Drosophila and C.elegans) have a urea cycle?
Perhaps worth adding that the role of the urea cycle in terrestrial vertebrates is the disposal of excess N derived from protein metabolism. Such animals are ureotelic. Arthropods, in contrast, are uricotelic, using uric acid for N disposal, so it would make no sense for them to have a functional urea cycle. (Nematodes - I don't know.)
The importance of avoiding having a urea cycle when it is not needed is illustrated by the situation in yeast (Saccharomyces cerevisiae). In yeast some of the enzymes that would be part of the urea cycle are used in degrading arginine, while others are used in the biosynthesis of arginine. Yeast cells will carry out one or the other of these processes depending upon their metabolic status. If both processes were to be active at the same time this would result in a urea cycle that would waste ATP. This is avoided by having a multienzyme complex consisting of arginase and ornithine transcarbamoylase (in the degradative and biosynthetic pathways respectively), allowing reciprocal regulation so that only one of these is active at any time.