Yes they certainly can, they do usually describe it in the title or the description of the dish on the menu, or the waiter/waitress will mention it, because some people do have a problem with alcohol and should never taste it so it's nice for them to know that first. But to my knowledge, there's no law against any restaurant using alcohol in cooking.