Negotiating a pay raise because a co-worker got one is never compelling from your employer's perspective. In this case, it sounds like your co-worker was paid similarly to you and got a raise because the company didn't want to lose him. This does not inherently make you underpaid.
However, it is possible to negotiate a raise without getting a competing offer. If your company has a review process, that is often an automatic time for you to make a case about the value you provide the company and why you should be making more money, get a promotion, etc. You do not have to wait until reviews happen.
When I've done this, I've focused on the type of work I do and the amount of work I do. Essentially, this means making a case to your employer that you do an amount of work that is higher than your salary level and or you do kinds of work that are above your salary level. You didn't mention what kind of work you do, but a software example would be if you are paid like a junior developer, but you are doing lots of design, offering input into larger problems, and or owning significant tasks / projects, then you ought to be able to make a case that you should be paid more like a senior developer. If you can demonstrate that you take on the more difficult problems from your team, or that your output goes above and beyond, these are also ways to make a case that you deserve a raise.
Personally, I would try these things before spending a lot of energy looking for a new job if the only thing you really want is more money. I think that employees and employers tend to know that most people can get paid more by jumping around, and I think that if a company values you and is run decently well, then they will respond to these kinds of requests (provided they are anchored in reality / backed by data).