Do you need brakes on a trainer / on rollers?
No. For fixed trainer, it should be obvious.

For rollers, rolling resistance is higher on rollers than on flat surface. Wheels don't also have much momentum, so you can slow down by freewheeling for a few seconds. The only use for brakes is preparing to dropping off the rollers: rotating tires leave a nasty skid mark on the floor but brakes stop the wheel immediately.