There is no simple "assassinate" action, but there are options
There is no simple mechanic for directly assassinating someone within the rules of D&D 5e, but there are a number of ways to put characters into a situation that is highly likely to result in death. First of all, any attacker can deal massive damage to a "helpless" target (specifically, unconscious or paralyzed), as described in the answers here. The simplest way to attack someone while they're unconscious is of course to wait until they go to sleep for the night. However, most people tend to wake up when you stab them, so this only gives you one good hit. If that's not enough, the assassin might consider bringing along some crawler mucus, a contact poison that paralyzes the victim for up to a full minute, giving plenty of time to dispatch them (or another suitable poison chosen from the list in the DMG). If the rival guild has access to spellcasters, there are of course spells such as hold person that can paralyze a target.
If attacking the PC in their sleep is not a viable option, there are some monsters with abilities that make them suited to ambushing, such as the aptly-named Assassin. An assassin that gets the drop on a PC can make 2 poisoned shortsword attacks, both with advantage and automatic criticals on a hit, and add sneak attack to that for a total of 26d6+6 damage, assuming all attacks hit and all saves against poison are failed. If 2 or more assassins are involved in the ambush, even a high-level PC is likely going to be in for a bad time. Obviously the assassin stat block is almost perfectly crafted for the purpose of assassinating people, but you can certainly find other monsters appropriate for the task as well.
(Note that the assassin's stat block appears to be heavily based on the stat block for a 12th level assassin rogue. If you need a lower level assassin for balance purposes, you could go back to the rogue class description and build an assassin of the desired level.)
These options all give the PC a chance (as they should)
None of the above options will allow you to instantly and automatically kill the PC, which is a good thing, because player agency is important in D&D. In each case, the PC has a chance to notice the ambush before the trap is sprung, avoid the attacks, make their save against poison, or otherwise evade the trap through one or more rolls of the dice or clever use of spells like alarm, which all makes for a much more interesting and engaging experience for the players.