Did the dog receive all of its puppy vaccines and was he/she dewormed (twice)? When you take it to the vet (and, yes, you should) take as much of the dog's medical record (especially the vaccinations and deworming dates) with you.
The blood could come from something easily treated like an anal fissue/ abscess, or something as serious as cancer. Blood in the stool really needs to be evaluated by a vet because no matter what the cause, it isn't something you can cure by yourself. Is the blood noticeably bright red, and how much blood are you noticing?