These are chat archives for esp8266/Arduino
<ESP8266WiFi.h>but I want to use esp8266 as modem for other arduino board).
Absolutely. The original firmware had the AT commands that did that. It was fairly limited, but you could do things like connect to an access point and do http gets etc.
Another thing you could try...I haven’t tried this, but you could flash the esp with the arduino firmware and then come up with your own set of serial commands that another arduino could send that would allow you to run arduino functions on the esp. That would be a far more flexible solution.