First, you need the permission. Guild ranks in World of Warcraft control who can invite, so if the option is missing, that is why.
Press the O hotkey to open your social panel, then select the Guild tab along the bottom. At the bottom of that window there is an Invite Guild Member button. Click it and type the exact name of the player you want, then confirm.
The name has to be spelled correctly, including any capitalisation quirks. If the invite fails silently, a typo is nearly always the reason.
You can also whisper the person first to check they want in, which saves the awkwardness of inviting someone mid-raid. And if you are on a different character from the one they know, say who you are before sending it.