Is 4 of July a noun?

Yes, The 4th of July or The Fourth of July is a word for a holiday, a thing, and a proper noun, the name of a specific holiday.

The word July alone is a proper noun, the name of a specific month of the year, a thing.

The word 4 (four) is a common noun, a word for a number, a thing. All numbers are nouns; all numbers are adjectives when used to describe a noun such as four houses, four people, etc.