If I switch from flat bars to trekking-style bars, should I get a shorter or longer stem? Or can I keep using my old stem?

Depends on what you want to achieve. If you use your current stem then the section of the bar where you mount the controls will be closer and the other side will be further away. You can use a longer stem so that the controls will be more or less at the same distance they were before and the forward section is further still away which is what I did.

With my 50 cm wide Modolo Yuma (trekking) bars the difference in reach is 50 mm but on bigger bars it may be even more. You could be looking at using a 130 mm stem at least

I have three bikes set up with the butterfly bar and retained the same stem so I don't think you would need to change that. Unless you feel that the part of the bar closer to you is too close. But try it like that first to get a feel of it and you'll know if you need to change the stem..