Yep, both work. If you don't want to clean the pre-filter every few days go with the zoo med, they last much longer in my experience also.
When you go to the store (I know petsmart carries both the fluval and the zoo med) open the boxes and check out the differences in the foam. The fluval has a fine pore size and the foam is nowhere near as durable as the zoo med. Fluval works well for filtering very fine particles, but clogs quickly and wears out fast.
Zoo med requires less maintenance but won't polish the water as well as the fluval, but also will not clog easily.
Both work for keeping shrimp and fry out of the filter.