Can we say this sentence is grammatically correct English?
I want to be a good person to invite to a party.
The intended meaning is:
I want to be a person who is good to invite to a party.
Your source that claims the sentence is ungrammatical is incorrect. That pattern is used frequently.
He's a good man to have on such a project.
It's the best tool to use for that purpose.
It was the worst choice to have made in those circumstances.
It was the thing to do.
An infinitive clause can complement the noun phrase.