While the capabilities of these devices include both input and output, and on some channels analog input as well, the functionality in the question is a subset of these, and thus well served by these modules.
Alternatively, an Arduino Mega (or clone) provides all this functionality, 54 GPIOs, plus flexible programmability. Thus it is a superset of the GPIO modules mentioned above. They are sold on eBay and other sites for under $15.
Add on a Mega Sensor Shield, and you will have 54 GPIOs available to you as separate 3-pin connector blocks each with GND, VCC and IO pin, each with the facility of programmable pull-up resistors internal to the microcontroller:
That photo of the pin names is wrong. P9 is the one closest to the power jack. Look at your bbb, it has P9 and P8 printed at the end of the headers.
If the photo of the bbb connected to a breadboard is yours then your input is connected to P8.12