Is there a law or regulation that prohibits writing task orders with the NAICS Code of 336413 for services not incidental to the purchase of supplies from the contract?
This response is based on the information provided. We suggest you discuss with your contracting team, program manager and/or legal department as appropriate.
The purpose of NAICS are to identify the type of work the government intends for a given action and for companies to identify the type of work they are capable of. It is your team's job to determine through the selection/negotiation process to determine if an offeror is capable of performing the work.
There is no law prohibiting creating a contract action simply because the solicitation NAICS and offeror NAICS do not match.