The volume \( V \) of a rectangular prism is given by the formula:
\[ V = \text{length} \times \text{width} \times \text{height} \]
For the rectangular pyramid, the volume is given by:
\[ V = \frac{1}{3} \times \text{base area} \times \text{height} \]
Since the base and height of the pyramid are congruent to the dimensions of the prism, we can use the same base area (length \(\times\) width) and height.
Let the base area of the prism be \( A = \text{length} \times \text{width} \), then the volume of the prism can be expressed as:
\[ V_{\text{prism}} = A \times \text{height} \]
Given that the volume of the prism is 252 in³, we have:
\[ A \times \text{height} = 252 \]
Now, substituting the base area \( A \) into the volume formula for the pyramid:
\[ V_{\text{pyramid}} = \frac{1}{3} \times A \times \text{height} \]
Since \( A \times \text{height} = 252 \):
\[ V_{\text{pyramid}} = \frac{1}{3} \times 252 \]
Calculating the volume of the pyramid:
\[ V_{\text{pyramid}} = \frac{252}{3} = 84 \text{ in}^3 \]
Thus, the volume of the pyramid is \( \boxed{84} \) in³.