If the rectal bleeding or blood in the stool lasts for more than one day or gets worse then you should see a doctor about it.
If the blood goes away after a day and you no longer see blood in your stool then you're likely fine and may not need to see a doctor unless the blood comes back in the stool.
If the blood doesn't go away in the stool after one day or the blood in the stool gets worse you should see a doctor about it.
Most times when someone is bleeding from the rectum and has blood in the stool it's usually due to hemorrhoids or anal fissures.
In some severe cases blood in the stool which lasts longer than a day or gets worse could indicate bowel cancer but most times blood in the stool is not harmful or life threatening but it's a good idea to get checked out anyway to be sure.