An unexpired Nexus ID is a government issued ID, the same way as your driver license or provincial ID. It should be acceptable to fly anywhere domestically in Canada AND US. And I would think internationally too on a departure ticket. TSA usually just swipe it and your info should be pulled up. Never had an issue.
The gate agent is stupid.