OP is actually asking two related but different questions, one in the title and another in the question body.
ANSWER TO TITLE QUESTION: Yes, Janeway did trade technology with other races.
A prominent instance is "The Killing Game" (part 2), and Janeway's actions in that episode directly lead to the events in the episode cited by OP. In "The Killing Game", Janeway offers the Hirogen holodeck emitters in trade for...well...their lives. Crew members were being maimed over and over again by the Hirogen, who had taken over Voyager and had been using the crew as game for hunting. Janeway's decision was a reaction to extenuating circumstances, but she must have also weighed the potential consequences and concluded (at the time) that any negative outcomes would be minimal. Furthermore, the Hirogen were a warp capable species and the technology was not one with direct military capabilities. This brings us to OP's second question.
ANSWER TO QUESTION IN BODY: Yes, there are rules that prohibit exchange of technology, in many circumstances.
Starfleet officers are not allowed to exchange technology with, or offer technology to, pre-warp societies. Starfleet officers are also prohibited from sharing technology that could upset the balance between two or more powers. Thirdly, Starfleet officers are not allowed to offer technology to non-aligned regimes, and especially not to regimes hostile to the Federation (e.g. to the Romulans).
Interference in the societies and cultures of others, whether it be by the introduction of foreign technology or by any other means, is strictly prohibited by the Prime Directive.
The third scenario I mentioned (sharing with non-aligned worlds and hostiles) can also be classed as treason under laws protecting Federation and Starfleet security. This type of scenario is dealt with in the TNG episodes "The Drumhead" and "The Next Phase", for instance. In the former, an investigation and trial occur aboard the Enterprise, and one aspect has to do with whether or not a medical officer had collaborated in supplying Enterprise engineering schematics to the Romulans. In the latter episode, the Enterprise offers a computer core to a damaged Romulan War Bird — but one that is 30-40 years old, to avoid compromising Starfleet security.