I created a rectangle with the rectangle tool and I'd like to add vertices to it. I usually double click on the edge to add a vertex but it seems like the rectangle I created is some kind of special shape that doesn't behave like other shapes.
When you create a rectangle using the rectangle tool in Inkscape, it creates an SVG rectangle object in Inkscape, which can be seen in the XML Editor as something like
Here's an example:
You can turn the rectangle into a regular editable path by clicking Path > Object to Path. This will convert the rectangle into a regular SVG path, rather than an SVG shape. Then you can add or edit the nodes as you wish.