The state-backed lender’s third-quarter loss came amid a challenging period for its investment bank.