When we are talking about primes, are they defined only in terms of the set/structure they belong to?
E.g. $3$ is a prime but $3= (\sqrt 7 - 2)(\sqrt 7 + 2)$ so it has factors but since they do not belong to $Z$ they are not considered as such and hence $3$ has only $1$ as a factor.
But is $3$ then considered composite for the set of real numbers?
Hence all the primes that we know in the realm of $Z$ are not really primes when moving up the set of numbers?
I think you are right, even though the nomenclature you used is wrong. The concept of a prime is first taught to us (and was first defined) for natural numbers, so the common definition of prime only considers factorisations in natural numbers, however this concept of factorising a number is not exclusive for natural, whole or rational numbers. In any set with some analogue multiplication you could define it. This is why it is more generally defined for rings.
Rings are algebraic structures that consist of a set with addition and multiplication such that addition is commutative has identity and has inverses (you can "subtract" and have a 0). Also you have to have the associative law and sometimes multiplication has an identity (an analogue to number 1, since it "does nothing"). Examples of rings can be the integers, rationals, reals and even other sets such as that of matrices with real entries. As we can see with the last example multiplication need not be commutative, but for simplicity lets assume it is, if you are interested in looking at the non-commutative case there are plenty of texts treating non-commutative rings. In rings you can also define a prime, and it is usually done in the following way.
A prime in a ring $R$ is an element $p$ of this ring such that if $ab=pk$ then $a=fp$ or $b=sp$.
In other words, if $ab$ is a multiple of $p$, then either $a$ is a multiple of $p$ or $b$ is a multiple of p.
In the integers this definition is the same as that of a regular prime. If we allow a ring such as the integers to have more elements then elements that were prime can stop being so. You gave one example with $\sqrt{7}$, if we allow to add, subtract and multiply this number in conjunction with all the integers we say we "adjoin" this element, since it wasnt there before, and we indeed "lose" some primes. Sometimes you even loose unique factorisation.
In summary, answering your question it is true our "everyday primes" stop being so in other situations such as the rationals or reals. In fact, in these two cases in fact none of the original primes remain primes, and 0, which wasn't a prime in the integers, becomes a prime (the only prime) in the rational, real and complex numbers. This is because they are fields, a special kind of ring.
All of this has been explained quite informally, if you are interested in the topic you can read other basic texts on rings in which everything will come with much more rigour, however if you haven't done any abstract algebra before better start with a basic book on that, which will probably explain the basics of this too.