Yes. Most musicians are trained as to the qualities of the chords in a key; I-ii-iii-IV-V-vi-vii(dim). So when learning, most people see a B chord in E major, and they think, 'The E major scale goes E-F♯-G♯-A-B..., so B is the fifth of the scale; since the dominant (5th) chord is major, it has to be B major'. This is the logical way to do it.
As musicians get better and more experienced, however, they often just know through memorization. Not necessarily through concentrated effort, but often osmosis due to their near-constant exposure. They'd think, 'Okay, we're in E, so it's B major'.
In my opinion, this is a great skill to have, as it severely reduces the amount of time you have to take to think about chord progressions. It also allows one to communicate more easily with others; as a trivial example, if someone tells me to play a "two-five-one", I don't need to ask them what qualities the chords are.
I therefore recommend knowing one's major scales and minor scales (more on that later), and also learning the relative diatonic chords (meaning "the one is major, two is minor, et cetera..."). but I also recommend simply practicing playing diatonic chords a lot, so one can simply know that, for example, B major has G♯m, without having to think about it.
Minor keys are a bit more difficult. In B♭ natural minor, the F chord is minor. However, there's a thing called harmonic minor, and that replaces the ♭7 degree with the leading tone. So, B♭-C-D♭-E♭-F-G♭-A♭-B♭ becomes B♭-C-D♭-E♭-F-G♭-A♮-B♭, and consequently some of the chords change qualities. Namely, III becomes III+, v becomes V, and VII becomes ♮vii(dim). Don't worry too much about this, beause there's a third type of minor, and the first two are nearly interchangeable/inseparable anyway; just remember that that F chord is very often changed to F major.