Will totally depend on the size of the 18month old! That said, most kids curl up to sleep versus sprawling out so even if squished they can manage a nap in a playpen in a pinch. My 99th percentile 2.5yr old daughter long ago out grew the playpen (head and feet touching the ends). It does also depend on the playpen. The lower end models may not hold the child's weight as well.

My guess is that 18months you will benefit from getting them settled into routines and expectations by having them secure in a playpen (or crib). Once they are used to your expectations you can try them on a mat.