If I had a true random number generator that had a fault where 10-20% of the bits never change (these bits always produced the same value every time the TRNG was called), could I feed the result of the TRNG through a hash function (let's say SHA-256) to generate a unique and secure key?
could I feed the result of the TRNG through a hash function (let's say SHA-256) to generate a unique and secure key?
Yes, and in fact, that is very common practice.
Real TRNGs often don't produce precisely uniform and independent bits, due to device defects or subtle interactions with the environment. To compensate for this reality, we generally pass the TRNG output through a conditioner, which takes good (but not perfect) entropy and converts it into a more uniform output.
A SHA-256 would be one example of a good conditioner; what you would do is estimate how much TRNG output would have at least 256 bits of entropy (worse case), send that much through SHA-256 and the SHA-256 output would have approximately 256 bits of entropy (assuming that SHA-256 does not have an unsuspected weakness).
In your example, if we have for each 8 bits of TRNG output, 2 bits are fixed and the other 6 is uniform and independent, then you'd want at least $8/6 \cdot 256 < 344$ bits of TRNG output per SHA-256 hash (and if you have doubts about the other 6 bits, feel free to bump that up; the only downsides for having too much input are the practical ones).