“Integrity is doing the right thing, even if nobody is watching.”
“Integrity is doing the right thing, even when no one is watching.”
Not found in Lewis's works.
"Integrity means doing the right thing at all times, without hesitation" is found in a 1943 syndicated newspaper column. Elsie Robinson, "Listen, World!" https://www.newspapers.com/newspage/58360960/, Evening News (Harrisburg, PA), 1943-02-24, p. 10.
"Integrity means doing the right thing even when no one is there to judge" is found (unattributed) in the 1965 Journal of Clinical Psychology https://books.google.com/books?id=9rm1AAAAIAAJ&dq=%22integrity%22+%22doing+the+right+thing%22&focus=searchwithinvolume&q=%22doing+the+right+thing%22.
The quote became attributed to C.S. Lewis by 2012 https://books.google.com/books?id=XH-1TURLaf4C&pg=PT154&dq=integrity+%22even+when%22+%22c+s+lewis%22&hl=en&sa=X&ved=0ahUKEwi6x9XznoTKAhUKymMKHdoKCKoQ6AEIHTAA#v=onepage&q=integrity%20%22even%20when%22%20%22c%20s%20lewis%22&f=false.
Misattributed
Help us to complete the source, original and additional information
Clive Staples Lewis 272
Christian apologist, novelist, and Medievalist 1898–1963Related quotes

Presumably a paraphrase of "A peculiar virtue in wildlife ethics is that the hunter ordinarily has no gallery to applaud or disapprove of his conduct" or of "Hunting for sport is an improvement ..." above.
Unlikely to be by Leopold, who knew that ethics involves not only doing the right thing, but also determining the right thing in the face of competing desirable criteria.
Misattributed

Don Soderquist “ Live Learn Lead to Make a Difference https://books.google.com/books?id=s0q7mZf9oDkC&lpg=pg=PP1&dq=Don%20Soderquist&pg=PP1#v=onepage&q&f=false, Thomas Nelson, April 2006 p. 145-146.
On Acting with Integrity

Source: A Sand County Almanac, 1949, "The Land Ethic", p. 224-225.
Source: A Sand County Almanac and Sketches Here and There
Context: Examine each question in terms of what is ethically and esthetically right, as well as what is economically expedient. A thing is right when it tends to preserve the integrity, stability, and beauty of the biotic community. It is wrong when it tends otherwise.

As quoted in Teen Ink : What Matters (2003) by Stephanie H. Meyer, John Meyer, and Peggy Veljkovic, p. 309