The argument would be that Dodson is writing the book "in the course of doing his job" so he has no first amendment protection?
The two are obviously related, but the book seems separate from his job. The government is not paying him to write it, nor is it anywhere in his duties. If anything, it's within his duties as a citizen, not as a LEO, to tell his story.
The Government can restrict you from doing activities closely related to you job duties. Writing about the ATF while working at the ATF would certainly fall under this regulation. This happened in my organization, one of the engineers wanted to take a job as a consultant in his area of expertise, also the area he work in at the Gov, the boss said no. This is part of the ethics standards to keep persons from earning outside income while doing government work and being paid by the taxpayers. Of course there is a lot of discretion involved in these type of decisions. If the boss determines the duties are beneficial for the Government they can permit a lot of outside activities even if they have conflicts. I had to get permission to serve as treasurer of the local high school band boosters, because, even though it was for no pay, I was an official of a corporation.
If the contract is worth a lot of money, he can quit and publish the book, assuming no confidential/secret information is included. My engineering friend quit his job because he could get better money elsewhere.