It sounds like this pipe goes no place at all being 18"?The main drain in my house is located in the laundry room & comes down from the top floor to the basement, and into the foundation. A few years after moving in my wife noticed a straight pipe about 1-1/2" diameter x 18" coupled into the main line which is quite bigger. She once seen something drip onto the floor from this small pipe. I wasn't sure what it was so I applied a piece of duct tape to it as it looked like the tape on it deteriorated. What is a toilet vent? What is this pipe? I would include a pic but camera is at work.
If thats the case it is nothing. I'm sure it was for something a long time ago but the plumbing in your house has changed and it was discontinued. That is not uncommon in older houses that may have been worked on by none plumbers.