Was I wrong to rebutt unjustified rewiewer comments in the review?
It's fine to push back against reviewer comments, but it can be a bit of a delicate dance to do so.

First, I would suggest you take reviewer comments that are unjustified to mean that you didn't do a good enough job explaining what you did. Although it's possible the reviewer was simply sloppy in reading your paper, a lot of people are going to sloppily read your paper: give them as few ways to get it wrong as possible by being extremely clear. Communication is between the reader and the writer: it isn't only the reader's fault if the reader gets it wrong. You can apologize for your role in the miscommunication and do better in the revision.

Second, I would suggest whenever you plan to push back against large parts of an individual review, rather than just a modest misconception or two, have a less-involved person that you trust to give honest feedback review your remarks. Sometimes a coauthor with a smaller contribution is sufficient (i.e., not the primary or senior author, who may feel most personally involved in the work), other times it may be helpful to reach out to someone else outside the authorship group. Ask them explicitly whether they think your response is sufficiently polite. Ask them to play the role of that reviewer or the editor. Additionally, give yourself a bit of time to sleep on both the reviewer comments and your response, at least a day or two and maybe a week or two. Personally, I sometimes write my angry/snarky response in a private document for myself to "get it all out", spend a couple hours complaining to people close to me about how worthless peer review is, and then come back to the original comments later and start working on real responses to what turns out to be helpful criticism. You can skip the first two parts of that if you want, but the last part is crucial.

Third, make sure you aren't really missing something in the comments you think are unjustified. Your question here is vague, so I am only guessing, but you say:


  he/she stated that the "experimental treatments" weren't independent, while our study was purely observational and didn't include any experimental manipulation


If you responded to the first part of that comment and say "this comment doesn't apply because our study was purely observational" I would, as the editor, probably reject your paper. The real, important comment there is the lack of independence, which is often a critical weakness in an observational study. It may be that you interpreted your data in a way that implies an experiment has taken place, when it hasn't, and that makes the reviewer's comment very very relevant, even if they misused the word "experiment." Be careful that you haven't used causal language, that you have done field-appropriate comparisons between any groupings you made in your observations, etc.

Finally, it's quite possible for you to do everything "right" and still be rejected. For a more selective journal, especially, an editor may reject if there is insufficient support from the reviewers, even if you are able to refute some of the criticisms. They are looking for papers that the reviewers agree are excellent, and it's possible that observational work is simply not a good fit for this journal.