Is there a way to create music in Dorico that starts ametrically, moves into something with changing meters, then comes back to ametric music? Or is that entirely dependent on flows? Thanks!

Very simple: write your music as you wish at the beginning; at whatever point you’re ready for a meter, put one in, and then when it reverts back put open or X into the meter popover. You can have ametric sections wherever you want.