Whilst I sympathise with the OP, and in her shoes would do as she did, the responses here are largely based on quicksand - there is a vast difference between sympathy and the law.
I hate the way so many work bosses trivialise and get irritated by parents needing time off work when their young children are ill.
They are employers. Their role is to employ people who come into work and work. Childcare needs, illness etc may be unavoidable, but that does not get the work done. Your priority as a parent may be your child. Their priority as an employer is the work being done.
If you were in your 50s or 60s and called your boss to say you are a carer for your dependent and infirm husband who cannot look after himself, that he has other people to care for him whilst you are at work, but that he is ill so you need to stay at home to care for him, you would not have been met with this response from your boss.
Of course you would. Why on earth would you think it makes a difference? If anything employers are often less sympathetic towards carers for adults.
Take it as parental leave or annual leave
You need to ask for annual leave in advance and you cannot take it if it is refused. Parental leave must be taken in full weeks, unpaid and must be applied for in advance. Emergency parental leave is time off to make arrangements for your child's care, such as taking them to the doctor or making other care arrangements. It is not for childcare.
You can't be sacked for this.
Of course you can. It is unlikely if you have more than two years employment, and probably unlikely if you have less than two years and do not have a poor attendance record, but it is irresponsible to state that someone cannot be dismissed. Especially with less than two years employment it is relatively easy to dismiss somebody.
It is all very well saying an employer is unsupportive, being unreasonable etc. It is all very well saying to prioritise the child. Those are all opinions. They might be the majority opinions. But they are not the law. The manager was wrong to show her frustration about the circumstances, but she has, on technical grounds, done nothing wrong.