This has been getting me stuck. I've tried to understand what a detergent would do in an assay, but I can't figure out whether it would affect the protein or the reagent (say, in a Bradford assay).
Depending on the detergent, its concentration, and the exact assay being performed, it can affect both the protein and the assay reagent(s). Some detergents will bind the (usually colorimetric) reagent, or otherwise chemically react with it, giving high background to your assay and sometimes completely masking the specific signal of the assay itself. Many modern protein assays are tolerant of a fairly low level of various detergents, perhaps some but not others, and this underscores the necessity of running a buffer/diluent-only control to verify the background of your measurements. Other assays, like Bio-Rad's DC Protein Assay or the Pierce Detergent Compatible Bradford Assay Kit from ThermoFisher, are engineered to tolerate a certain (often fairly high) level of detergent without increasing the background of the assay.