Can IK constraint be setup so it respects constraints of affected bones
When you have an bone set to use an IK constraint, every bone in that chain enables the Inverse Kinematics tab, found in the bone properties (almost down the bottom)

Here you can set limits on the XYZ axis of each bone. the X and Z axis limits show up in the display as a red and blue circle. Y doesnt show up as Y is rotation along the axis of the bone.

using axis limits does cause some popping, so you will want to use a Pole target for the IK constraint to allow better control.