Unfortunately, the Apple Pencil won't work with the iPhone Duo at launch. Apple hasn't provided many details yet, but we know that Apple Pencil support will require an iOS update coming later this year. Since the iPhone Duo is expected to ship with iOS 27.1 in October, support for the Pencil could arrive with iOS 27.2 around November.
Even with the right software, you also need a specific Pencil model: only the Apple Pencil USB-C is compatible with the iPhone Duo. Those with an Apple Pencil 2 or Apple Pencil Pro are out of luck, and will have to spend an extra $79 for the compatible stylus if they want this functionality. Apple wasn't specific about the reason for this, but it's likely because the iPhone lacks the magnets needed to attach and charge the Pencil. On compatible iPads, you can simply attach the Pencil to the device to charge it magnetically. For the iPhone Duo, pairing and charging requires plugging in the Pencil with a USB-C cable.
The good news is that the Apple Pencil works with both screens on the iPhone Duo: the large screen when unfolded, as well as the outer screen. That makes it great for jotting something down quickly, as well as taking longer handwritten notes or drawing. Of course, carrying around a large Apple Pencil with your iPhone might not be convenient, but at least the feature is there for those who really want it.
And in case you're wondering, other iPhones don't support the Apple Pencil.