I've tracked this down, it's because the 1331 library is missing an include defend block, to prevent duplicate inclusion.
I'll try and get around to putting a PR in for that library. In the mean time you can put include defends around the Adafruit_SSD1331.h file in the library.
at the top:
#ifndef _ADAFRUIT_SSD1331_H_
#define _ADAFRUIT_SSD1331_H_
importantly at the end
#endif //_ADAFRUIT_SSD1331_H_
Ensure a newline after the above.
Then it compiles for me.
Also, the sketch was missing the actual declaration of the adafruit variable. The code generator only exports the variable, you must define it in the sketch. See:
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/tcmenu-plugins/adafruit_gfx-renderer-plugin/