Morgan Freeman appears in all three Nolan Batman films as Lucius Fox—though the question specifically asks about The Dark Knight (2008).
Freeman's Fox is the moral and technical anchor—Bruce's conscience check and gadget enabler. He does not appear in The Batman (2022) or the Burton/Schumacher films.