I had to collect my now 17 month olds poop when he was about 12 months. I got one of those pee cups and just scooped it in from his diaper. I had too for the doctors to see if there was bllod in it. Turned out no but it was well gross.
Pee is sterile, so I don't think it matters if there is pee in it. Scrape it from his diaper. I wouldn't worry about getting diaper pieces in it either, for what it is being checked for, they should be able to tell what is poop and what is diaper.