I think it may have been forbidden for goals to be scored off the body at one point.
In very early hockey, it was forbidden for players to kick the puck anywhere on the ice. Allowing players to kick the puck as long as it wasn't around the goal was one of the rules pioneered by the Patricks' Pacific Coast league in the 1910s, and it was eventually adopted across Canada.
In 1912, Art Ross proposed a number of rule changes. Among them was a proposal that goals scored off the body of an opposing player,
including the goaltender, should not count! I guess Ross was of the opinion that goals should be scored on a clean shot directly into the goal.
Daily Phoenix, Aug 17, 1912 (originally appearing in the Montreal Star).
Regarding goals--The umpire shall decide if a goal was fairly scored. In case of a foul having been committed in the scoring, the umpire shall notify the referee. A puck kicked or knocked in the net by the body of an opposing player, or thrown in by the hand, shall be a foul.
Were this rule passed it would give the goal tenders a fair chance, as last year in many cases players would rush up on the goal man and knock the puck in off his body before the defender had a chance. Joe Hall, of Quebec, was the man who pulled off that stunt last year, said Ross.
I'm not aware of a rule prohibiting goals off an attacking player, but I think Ross's proposal to ban goals off a defending player implies that such a rule may have existed. Otherwise you'd think he would propose to ban goals off an attacking player as well, right?