If you live in the US, purchase and service the vehicle in the US, under the Magnuson-Moss Act, a dealer must prove, not just vocalize, that aftermarket equipment caused the need for repairs before it can deny warranty coverage. If the dealer cannot prove such a claim it is your legal right to demand compliance with the warranty. The Federal Trade Commission administers the Magnuson-Moss Act and monitors compliance with warranty law.

The idea that you must use a manufacturer's part is called a 'tie-in' sale and is generally prohibited. With some exceptions, Section 102 (c) of the Act prohibits the manufacturer from including a tie-in sales provision in your warranty unless the manufacturer can show their specific part is required for proper operation.

The bottom line is that it is not simply up to the dealer to decide, there are consumer protection laws in this area.

But beware, do your own research as the application/interpretation of the M-M Act laws vary from state to state and out-house lawyers like me won't be going to small claims court with you.