Ji412jo had the idea, I'm just posting it before he forgets:
Lucy easily entered Alicia's room, because it was open - even if Alicia opened it for Lucy. When they were both inside the room, Lucy stabbed Alicia, then left the room through the open door and left it open. In the early morning Howard was walking through the corridors and saw that Alicia's room was open, so he closed it with his masterkey. Only later did he unlock it again to find the dead body of Alicia.