It's not an iron-clad law or rule, so Trump certainly wouldn't get in trouble for just the meeting alone. There have been times in the past whereas there were private meetings, but ever since Hoover, this has been strongly dissuaded because he was very "political", and in the worst way. When Obama met Comey, for example, he told Comey that this would be the last time there would be direct talks with him without an intermediary. However, I do believe they had two telephone conversations, if my memory is correct.
So, the main question remains as to why Trump kicked everyone out of the room and shut the door just to talk with Comey, and the latter said he felt highly uncomfortable with this maneuver on Trump's part, and rightfully so. When Trump fired Comey, he later spilled the beans as to why he did it, and this should not be ignored.
Yes, under the circumstances, it does seem questionable, especially since Trump could have gone through the Attorney General.
I sometimes wonder if the higher level cabinet posts should be elective offices unto themselves. They wouldn't be appointed by the President, but elected directly by the people. Just like some state elections might have governor and lieutenant governor elected separately, as well as offices like state attorney general, state treasurer, etc.