Can I drop a 19 barrel in my 23? Does it work the same for after market barrels? If I buy one meant for a 19 can I use it in my 23 as a conversion barrel? Or would I need the actual conversion 40-9 barrel?
It is my understanding that the '19 barrel (in your question) works only with the slide assembly of the 19, and therefore would not work in the '23 (or would not work well), and vice versa. This is why the conversion barrels are so popular: it converts the geometry of the '23 to accept the smaller cartridge used in the '19 (40-9).
It may technically work but it's not a good idea. The 19 barrel's outer dimensions are smaller, so the tang at the rear of the barrel will gouge the sides of the breech face and you'll get inconsistent lockup. The round portion of the barrel that sticks out of the muzzle hole of the slide is also smaller, so much more stress will be put on the barrel lugs, locking block, frame pins, and the frame itself. Eventually one of those parts is bound to crack.
I'd get an aftermarket .40-9mm conversion barrel for the G23, it has the same outer dimensions as a G23 .40 barrel but it's chambered for 9mm. You'd also need to use 9mm magazines with that barrel.