I think you should check with a veterinarian, as it could be caused by cancer, internal parasites, a viral infection, internal cuts, small intestinal problems or a host of others.
If your dog is just having the bloody slime it could also be a parasite but if there is also vomitting there could be something in his intestinal tract.
Bloody slime in a dog's stool can mean a number of things. Sometimes this is the first sign that a dog has ate poison. It can also mean parasites or some type of infection. It's best to have the vet check such a problem because most of the time the cause can be serious.
Your dog may be trying to pass a sharp object he's eaten or have parasites, hemorrhoids, or a more serious problem. Scoop up his stool and take to your vet.
It could be a lot of things. Maybe your dog eat something rough that cut them a little going down. If it happens more then once or if there's a lot of it, it's best to take them to a vet with a sample of it. Your vet can runs tests if needed and let you know what's going on.
There could be many reasons for this, but the most common cause is worms. Other causes are Parvo virus which can be fatal and cause digestive problems. The best thing to do is to take your dog to the vet right away and have tests run to determine the cause and get treatment.