In your example, your compensation is so low (below $6000) that it becomes the limiting factor for how much you can contribute to IRAs. In Publication 590-A, the limit (here for 2019) for how much you can contribute to Traditional IRA is the lesser of $6000 and your "taxable compensation" for the year. So your question is basically whether a Roth 401(k) contribution reduces your "taxable compensation".
Taxable compensation is defined in the section "What Is Compensation?" (here for 2019). It doesn't explicitly talk about how Traditional and Roth 401(k) contributions affect the calculation of taxable compensation, but it seems like pre-tax Traditional 401(k) contributions would reduce the taxable compensation, but Roth 401(k) contributions wouldn't. For one, it says wages are considered compensation, and the IRS treats any amount shown in box 1 of the W-2 to be wage compensation. Pre-tax Traditional 401(k) contributions would reduce box 1 of a W-2 (if you were a W-2 employee), whereas Roth 401(k) contributions would not reduce box 1. In addition, in "What Isn't Compensation", it includes "any amount you exclude from income", which would include pre-tax Traditional 401(k) contributions but not Roth 401(k) contributions.
So I think that in your example, the person still has $3000 of "taxable compensation", even after a $3000 Roth 401(k) contribution, and thus can still make a $3000 Traditional IRA contribution.