My maltese had blood in his urine and it turned out to be kidney stones. You should have a vet check the dog in any case.
If it is a female dog it may be in heat if it is a male it might have an infection.. Same with female n might need to go to the vet..