As stated above, it depends.
If your last day on a rotation is a 24 hour overnight shift, then no, you can't be assigned to a new rotation. You can work 24 hours + 4 hours for transition of care. In those last 4 hours you're not allowed to pick up any new patients, so picking up a new service isn't allowed.
If your last day on a rotation is "night float" and you're working 8P -> 8A (a 12 hour shift), then they can have you work the next day. We don't do this -- all overnight residents have the next day off. But it's perfectly "legal".
If you're an intern, then none of this is OK as you can only work 16 hours. Assuming you work a 12 hour overnight shift, there really isn't much you can do with the last 4 hours.