Hernandez was forced from the field before the hour in Piraeus, compounding head coach Niko Kovac's defensive problems.
The left-sided France international was told he needed an operation after a second scan in Munich on Wednesday, although the club have not confirmed an exact timescale for his return.
The latest in a series of injury problems for Hernandez, 23, comes after first-choice centre-back Niklas Sule suffered a torn anterior cruciate ligament during Saturday's 2-2 Bundesliga draw at Augsburg.
"Lucas Hernandez's MRT scan in Munich on Wednesday afternoon confirmed the result of the initial scan carried out by club doctor Dr. Hans-Wilhelm Muller-Wohlfahrt and the medical staff in Athens (partial ligament tear in right ankle)," a club statement read.
"The Bayern defender must now undergo surgery.
Hernandez had only recently returned from a knee injury that saw him become the subject of a club-versus-country row when he was called up to France's squad for the Euro 2020 qualifying double-header against Iceland and Turkey, despite Bayern's wishes for him to recover at the club.
There was better news for the Bundesliga champion with regards to Javi Martinez and Serge Gnabry.
Spain midfielder Martinez was taken off at half-time against Olympiacos, but Bayern said he "only suffered neurogenic muscle hardening".
Gnabry took a knock to the knee in the fixture, but both are expected to take part in reduced training in the next few days.