your Vet is probably right, constipation will cause blood in the stools...just how much tho?
and if she is feeling pain while pooping she will associate that with the litter box and thus find another and another spot to go.
She does need to be off dry food, she needs alot more moisture in her food. dry has only 10% compared to canned at 78%...since cats normally don't drink much water they need the moisture from their food.
try many different brands and ingredients...start slow and mix 50/50 at first with her whiskas than gradually reduce the whiskas..she will soon get used to the transition.
good luck, keep us posted.
It could also be a symptom of urinary track infection, quite common, particularly in older male cats. A change in diet to a lower magnesium food should help but if he currently has an acute infection, he may also need meds from your vet. I would suggest offering both dry and canned food for older cats which are typically lower in ash and magnesium.