If it is small amounts probably not. My son has asthma and when he coughs for a few days (especially a hard cough and often) he will have blood in his phelgm as well. I rushed him to the ER the first time I noticed it and was told that it was caused by tiny blood vessels in his throat busting due to all the coughing. I am not a doctor but just wanted to share what I was told about a seemingly similar situation. More knowledgeable persons are here and can better help you.
Hi, if your phlegm is green in colour it may be that you have an infection and sometimes with an infection there can be small amounts of blood and you should then see your doctor to perhaps get an antibiotic. If the phlegm is not green as long as it is not large amounts of blood then as jaja says it may be due to excessive coughing.
Again i am not a doctor but i do work in the field of respiratory medicine. if you are concerned then speak to your doctor.
I suppose it depends on how much blood and of course the colour of the phlegm. if its only a little bit it could be caused my a sore throat. If your phlegm is any colour other than white or clear you have a infection so a trip to the doctor for antibiotics should clear both up.