It could well be the LCD is damaged in some way. Or that you're not supplying enough negative voltage - two AA batteries can at best provide -3.1V. 240x64 displays generally require -7 to -11V (referenced to GND, but the datasheets reference this to VDD making it ~-13V).
With that said, to a high contrast voltage would probably mean it displays nothing rather than flickering, it is difficult to say if the display is functioning correctly without the correct conditions:
-Stable 5V supply.
-Adjustable contrast voltage from -7 to -11V capable of about 5mA.
-A verified pinout of the display
-A verified initialization sequence for the T6963C.
I have used the u8g2 library myself, and whilst its very inefficient - it did work nicely with the T6963C displays I have so it probably isn't the library.
This page has the pinout:
https://www.hobbielektronika.hu/forum/karakteres-lcd-k-meghajtasa-vezerlese?pg=6 and suggests using two 9V PP3 batteries for the negative voltage. You could also use a ICL7660 or equivalent to generate the bias voltage, but for testing its just easier to use two 9V batteries. Even one would probably work well enough for you to test the display (thats -9V).