welcome to healthcare Magic forum..
There are various reasons which might cause blood in the stool like Hemorrhoids(swollen blood vessels in the rectum or anus that can be painful, itchy, and can bled sometimes), anal fissure(tear in the lining of the anus) and many more serious conditions like colon cancer
, colon polyps, diverticulosis
etc. You need to get yourself investigated so that exact cause can be determined and you can be treated accurately.
It s a good thing that you are trying to quit smoking
as smoking is associated with various long term effects on your body!!
You also need to follow a diet plan
consisting of lot of fibers and fresh fruits which would keep your colon healthy.
Hope this helps!!