Should I frame a wall before or after installing the subfloor?
Sounds like your wall is perpendicular to the joists? You can do that within limits, but the new subfloor edges need to be supported. This means you need a row of blocking on each side of the wall. That doesn't sound easier to me.

From an overall structural standpoint, you would not want a discontinuous subfloor the entire length of the house, but for just the length of a bathroom it shouldn't be an issue, as long as the edges are supported.