Dear friend, let's analysis your case!
Xarelto contains Rivaroxaban- an
anticoagulant,newer drug-so it has a long way to go , at present it's like an unknown friend! question is why were you taking it? If you are having Atrial
fibrillation (with valid reason to take anticoagulants) then there are few common drugs (cheaper,time proved,effective) available.But these older drugs need regular checking of PT/INR+/-
APTT but they have antidotes in case of emergency bleeding.I personally prefer known friend(even known enemy) than unknown people.
there are plentiful causes of coughing up of blood.I can't be sure without the very detailed history of amount,colour,frequency,associated symptoms,your age,addictions,chronic diseases etc.Please be bit detailed about such serious symptom(may be caused by simple infection, may be other serious disease).And at least have a Chest xray (PA+lateral) done urgently.You can mail me the xray and details (mainak.nrsmc@gmail.com).I'll be more than happy to be of some help to you.
Now the per rectal bleeding! Was it painful,what was the amount? Hard stool can cause tearing of mucosa and bleeding.It's nothing serious.Make your stool softer with water intake and laxative SOS.But if it's painless and the problem is persisting then you'll need a
colonoscopy.
Good luck.