Yes and no.
Yes it is possible to buy old military aircraft; they are frequently listed in the pages of aircraft sales periodicals like Controller, Trade-A-Plane, Barnstormers, etc. Popular piston engine military aircraft include the P-51 Mustang, AT-6 Harvard and T-28 Trojan. East Bloc jets like the L-39 and MiG-15 are also big sellers, due to their affordability to acquire and maintain. A number of historical organizations like the Commemerative Air Force operated old WWII fighters and bombers for display and exhibition. And the unlimited category class at the Reno Air Races is dominated by rebuilt and souped-up WWII fighters like the P-51 and F8F Bearcat.
However it is illegal to buy MILITARIZED aircraft, that is those equipped with weapons, either internal or external, military mission systems eg fire control radars, FLIR/Designators, electronic warfare suites, advanced engines or any other type of equipment or system which have national security classifications or ITAR restrictions associated with them. Sales of weapons systems like this requires Congressional approval, though, strangely enough, one could argue these restrictions violate the Second Amendment of the Constitution.
The United States has recently clamped down on the sales and imports of military surplus aircraft for this reason. Nevertheless sales of these products are still occurring. I recently saw ads for the sale of Panavia Tornado ADV aircraft which the UK is selling off to the highest bidders. Most likely these birds suffer some sort of demilitarization process. This usually entails mutilating the airframe to cutout wing hardpoints, removal of the radar and cannon and replacement of these items with counterweights - possibly even restrictions on the engines, stripping out datalink busses and classified avionics LRUs, etc.
UPDATE - One notable case of a civilian trying to acquire a military aircraft that gained national attention involved the Pepsi Bottling Company. It centered on the following television advertisement for their Pepsi Points promotional campaign.
As it turned out these 'Pepsi Points' could be traded on the open market at the time (as opposed to needing the additional trouble of buying Pepsi products for them) for $0.10/point. An investor named John Leonard spent 700,000 USD to acquire the required 7,000,000 Pepsi Points, then sent them into PepsiCo and demanded a Harrier in return, claiming that PepsiCo had made an offer in the ad. PepsiCo refused and Leonard sued. The judge in Leonard v. PepsiCo ruled that this did not constitute a legitimate offer as required by contract law and that the ad suggested the Harrier simply to be farcical. Later versions of the ad featured the price of the jet changed to 700,000,000 Pepsi points for added deterrence.
Some airframes were destroyed or donated to museums to prevent spare parts from being exported to unfriendly nations; this was the fate of the poor F-14. All Tomcats which could not be donated as artifacts or for gate guard/pole duty were chopped up and sold for scrap. The fact that Iran still operates some 70 or so F-14s and concerns about spare parts for the AWG-9 radar sets and AIM-54 missiles ending up there was the primary motivator for this. Hollywood producer Donald Bellesario attempted to acquire a flyable F-14; the sale was denied.
Still some aircraft make their way through the bureaucratic paperwork and end up in civilian hands. There is at least one F-16A and one F-18A which are in the hands of private owners and the Tornados discussed above will join those ranks shortly.