Go through these in order and stop at the first one that applies. If you are reading this for someone else, answer for them.
Call emergency services now if:
Avoid food and drink while waiting for emergency advice, unless a healthcare professional tells you otherwise.
Do not stop a prescribed blood thinner without medical instructions unless emergency staff tell you to do so.
And for anyone, someone who:
Get urgent medical help for any vomit containing blood or coffee-ground material, even if it happens only once.
If the bleeding has stopped and you otherwise feel well, arrange urgent same-day assessment rather than waiting for a routine appointment.
Routine follow-up is appropriate after the urgent problem has been assessed.
This may be needed to review test results, check for anaemia, or make sure treatment is working.
And for anyone, someone who:
The article also says
Do not drive yourself if you feel faint or unwell.
If possible, have someone stay with you.
Bring a list of your medicines, especially blood thinners like warfarin or apixaban , aspirin, and anti-inflammatory pain relievers.
Every sign above is quoted from the sofidex article on Vomiting blood. If you are not sure, err upward — it is always reasonable to be checked.