Protecting officers and employees doing their actual authorized constitutional tasks seems like a paradigm case for the application of a "necessary and proper" clause, whether in a constitution, statute, corporate board resolution, or similar grant of authority. If punishing violators/interferors is reasonably necessary to keep the tasks being performed, which it seems likely, then why not?That argument is sometimes made, but all the delegated powers to which the Necessary and Proper Clause might be applied are only to make an effort, not to get a result. That principle was subverted by Justice Marshal in McCulloch v. Maryland, who made a similar argument, but he was wrong. The power to punish or prevent interference with the exercise of authority is not logically necessary, because it is still possible to make the effort even if it doesn't succeed in its object. Punishing or preventing that interference was left to state law, and federal officials were just expected to have and use whatever force they needed to overcome interference. If interference is effective it is not because it is not subject to punishment, but because the effort is not supported by enough force or resources. Because the exercise may always be made effective with enough support, punishment of those who interfere is not strictly necessary.
Ergo, to punish or prevent interference is a distinct power that, to be exercised, must be separately delegated, which would require an amendment. The Framers didn't think of everything. They omitted much that we might now want to add, but the way to do that is by amendment, not usurpation.
To understand the distinction one has to get into the heads of the Founders, and understand their legal English, which is not the legal English of today. In that context, to delegate a power was only to authorize a certain effort for a reasonable purpose of the polity. That authority was accompanied by an appropriation of resources to be used in making the effort. If that appropriation was not sufficient, it would not be within the jurisdiction of the delegated power to use more resources than were appropriated. Similarly, while the effort might involve shoving aside anyone who attempted to interfere, punishing the interference after the fact, perhaps to discourage future interference, is not an effort that the original delegation implied, but a new kind of effort that requires a separate delegation of authority.
To make this more clear, suppose the official is delegated power by a corporation, church, university, or other private institution to do something, such as conduct some event at a location and time specified. Perhaps that power even comes from a delegation from the local government. That is a certain effort. Now suppose someone interferes with that effort, such as by shouting or other disturbance. Does the official have the implied authority to punish the offender? He may, if the offender is a member bound by contract with the private organization and its by-laws so provide, but they probably only provide for expulsion from the organization, perhaps if a fine is imposed and not paid, but not for imprisonment or death. That would require a separate delegation of authority, and to the surrounding government, not to the private organization. The private official could file a criminal charge of disturbing the peace or trespass, and have a public official prosecute, but he would be at most a complaining witness, not the prosecutor under the authority of the private organization. He could be delegated authority to prosecute as a public official by a grand jury, but that is a separate delegation.
Now one may argue that this separation for an official of a private organization within a polity does not apply to a situation in which it is a public official, but it does. I just used that to show the powers are distinct. A public official may have both kinds of power delegated to him, but the first power does not imply the second.
So, yes, the Necessary and Proper Clause does authorize things like buying the bricks to build a post office, if funds for that are appropriated. But if all the funded bricks have been bought and delivered to the site, all the official may do is lay them, unless he also has funds to hire workers to do that. Now suppose that the source of the funding is the U.S. Treasury, and that someone interferes by throwing rocks at the workers laying the bricks. Does that alone provide constitutional authority for Congress to pass a law to make rock-throwing at federally-funded workers a crime? No. The federal official would be expected to file a state criminal charge under state law. He could prosecute the charge. Under original standards, anyone, including a federal official, may prosecute in a state court under state law (and a state official prosecute in a federal court under federal law). But on state territory the activities of federal officials have very much like the same position as those of a private organization, except when they have specific delegated powers to go beyond that.
Federal officials have authority on state territory to prosecute for treason, counterfeiting, piracy and felony on the high seas, or offenses against the law of nations, but not for murder, assault, vandalism, theft, fraud, perjury, or anything else not specifically delegated. Penal jurisdiction is defined by what is done (subjectam), where it was done (locum), or who did it (personam), but not on to whom or to what it was done. On state territory federal officials outside their jurisdictions are not privileged to receive more favorable treatment or protection than any other person would be. That includes conferring more privilege or protection to themselves than to others, beyond what is explicitly delegated.
"Federal agent" is not a title of nobility. Or at least it is not supposed to be.