There are monoecious hermaphrodite flatworms, like planarias and taenias, and there are dioecious (having male and female individuals) species too, like schistosomes.