Dusk balls work in raids, yes (since raids are technically caves), and happen to be the best option in general. Do ensure you use Net Balls if it's a bug/water type, and Repeat Balls if you've caught the pokemon before, as those give better bonuses than the Dusk Ball when applicable.