If the question is really the math challenge in the title, and the explanation about drawing rectangles was just to make this on-topic here, you already have some good answers. However, if the objective is actually drawing good rectangles, and the mention of right angles is just clarification of the problem, there's a simple approach that hasn't been mentioned yet.
The paper has perfect right angles at the corners and you can take advantage of that. If you measure only along the edges of the paper, you don't have to worry about error due to the ruler not being perpendicular. Use the ruler just for measuring and drawing straight lines.
Say worst case is you need a rectangle somewhere in the middle of the page (if it is at a corner, that saves some work):
X and Y are the dimensions of the rectangle needed, and A and B are the distances from a corner. Use the ruler to measure those distances along each edge of the paper and mark those locations:
Align the ruler with the matching marks on opposite sides of the sheet and draw the connecting lines (clean up the lines beyond what's needed:
If you were precise, you've got your perfect rectangle with accurate right angles.
If the rectangle needs to be in an arbitrary rotation on the page, do the exercise above on another sheet of paper, but start the rectangle in a corner of the sheet. There will be only X marks top and bottom, and Y marks on the sides, with one horizontal and one vertical connecting line.
That will leave excess paper on just two sides of the rectangle. Use the lines that run across the sheet as guides, align the sheet edges, and fold back the excess paper, making a sharp crease on the two folds.
You now have a rectangle to use as a template. Put it in the location and orientation required on the "good" sheet and trace it.