Two possibilities:
1. North Park has a military surplus-type store one block east of 30th St. on North Park Way (one block south of University Ave. They have surplus stuff from europe, including Russian, Soviet, and East Bloc militaries, so is kind of interesting to roam around in. Finding a US Marines hat is a long shot, but possible.
2. At the MCRD just east of the airport, access via Pacific Highway, there is a Marine museum that may sell stuff if they have a gift shop, and next door to the northeast is a big PX that also may have what you are looking for. You can get on base by simply telling the guardhouse personnel you are going to the museum, which is pretty worthwhile in its own right for us history buffs, and it is free.