Yes, a child can often be vaccinated even after contact with an infectious disease, and sometimes vaccination is recommended during an outbreak for extra protection, but it depends on the specific disease and if the child has symptoms (fever is a key factor for delay).
If your child has a mild illness (like a cold without fever), they usually proceed as normal, but a significant fever or severe illness usually warrants a delay until recovery; always check with your healthcare professional first.