They are actually two different constructions. The first is obviously wrong though. 'Ourselves' is a reflexive pronoun meant to emphasize and and refer to the plural singular subject. Since the subject is 'I,' which is the first person singular, the pronoun 'ourselves' does not work.
'I invited myself to the party'
'We invited ourselves to the party'
'They invited themselves to the party'
The second construction is just using a pronoun to fill in the direct object of the 'invite.' The expanded sentence would read:
'I invited (all of) us to the party'
The 'all of' is redundant and can be dropped out if it's pretty obvious who 'us' refers to. We assume that it is 'all of.' Therefore, semantically it is pretty similar to the reflexive construction. The difference is subtle as the reflexive version, which emphasizes the subject, gives the impression that the perhaps the person didn't have the authority to invite themselves, but did so anyways. The second version is more neutral and there's more of a question whether it was OK to make the invitation. It's only when put into context that the two sentences might seem.