You can’t type Friend ID directly into the party invite - you first need to add them as a friend, then they’ll appear in your friends list for invites.
In Friends tab, click "Add Friend", enter the ID. When they accept, you can invite them to the party normally.