You cannot change the visual style of various parts of a single shape in SVG (absence the not-yet-available Vector Effects module). Instead, you will need to create separate shapes for each stroke or other visual style that you want to vary.
Specifically for this case, instead of using a <rect> or <polygon> element you can create a <path> or <polyline> that only covers three sides of the rectangle:
<!-- Move to 50,50 then draw a line to 150,50, to 150,150, and then to 50,150 -->
<path d="M50,50 L150,50 150,150 50,150" />
<polyline points="50,50 150,50 150,150 50,150" />
You could use a polyline for the three stroked sides, and just not put the stroke on the rectangle at all. I don't think SVG lets you apply different strokes to different parts of a path/shape, so you need to use multiple objects to get the same effect.
If you need stroke or no-stroke then you can also use stroke-dasharray to do this, by making the dashes and gaps match up with the sides of the rectangle.