I would doubt that they could. Most hospitals will not assign them to a ward where they could pass along vaccine preventable disease without some serious reasons.
The risk associated by passing on diseases which are totally preventable via vaccination is something hospitals and patients donโt want to risk (especially in a pediatric ward). Although I have no definitive answer I highly doubt they would let you not get vaccinated. Vaccinations save lives with little to no risk- please vaccinate!