The general answer to what happens to you when you are refused entry at a land border is that you are left at the border on the side you are coming from. In your case on the US side of the border. The bus will definitely leave without you (it will leave without you if you are taken off for secondary screening unless it is quite short.)
After that you are ...
Greyhound has several night buses leaving Buffalo and arriving in New York City:
10:35 pm - 6:15 am
11:00 pm - 6:45 am
12:15 am - 7:30 am
3:10 am - 11:45 am
You can get to Buffalo from Niagara Falls by walking across the Rainbow Bridge ($1 CAD cash toll; bring a loonie) and catching the NFTA Route 40 bus ($2 USD cash fare) at Centennial Circle (1st and ...
The website seems pretty clear to me. You have two options:
This option is only available for regular non-foldable bicycles.
This option is available for regular and foldable bicycles. But you need a bicycle bag, and you might have to partially disassemble your regular bike to fit the size requirements.
Electric bikes, ...
It does not appear that there are any direct buses, though it probably wouldn't hurt to pop in to the bus terminal in Popayán and ask. Failing that, the most straightforward route is to take a bus (7–8 hours) from Popayán to the border town of Ipiales, from which you can take a minibus or taxi to Tulcán, Ecuador, and from there a bus (about 4 hours) to Quito....