There may be a code that requires you to use a US passport, but what is the penalty? Bottom line, they're not going to throw you in jail, and since the US does not do outbound Immigration, there's nothing to catch you there with.
Again, there are two hurdles to cross on the way back. Getting a boarding pass, then getting through US Immigration/Customs. Treat them as separate events, and there should be no problems. I know plenty of dual citizens you use different passports pretty much at the same time. My brasilian ex, she would use her Portuguese passport to get a boarding pass on United out of Rio to Washington. Then, a minute later, she would use her Brasilian passport for outbound immigration at the airport in Rio. Then, for entry into the US, back to the Portuguese passport for Visa Waiver. On the outbound, she just used her Brasilian passport at US airport check-in and of course, on arrival in Brasil.
I had a friend who carried three valid passports - US, Israel and The Netherlands. Once he just handed all three to US Immigration and let them pick out which to use.