I am wondering whether it is fine to define a rectangle with right angles like Wikipedia's page of rectangle.
In Euclidean plane geometry, a rectangle is any quadrilateral with four right angles. It can also be defined as an equiangular quadrilateral.
Because that the sum of the angles of a quadrilateral is 360 degrees is a theorem, it is little ambiguous for me to define a rectangle with a theorem and some calculation (360/4=90).
And if that's is the case, is it fine to say a regular polygon (except equilaterial triangle) is a polygon which has equal sides and equal inner angles?
The definition is correct. It is normal to define objects after a theorem, even if at first it seems counterintuitive. In advanced mathematics it happens all the time that a result (like a theorem) permits you to write a definition that otherwise wouldn't make sense.
There is no ambiguity because:
You can call this unique case "rectangle", with no ambiguity.
(The only ambiguity, strictly speaking, is that there are many rectangles, of different sizes and ratios. But that is not a problem.)
The definition you gave for regular polygons is also correct.