$A$ nonregular language, is $A\cup B$ nonregular?
Here is one result in the direction you're looking into:


  Suppose that $A,B,C$ are languages such that $A$ is a non-regular subset of the regular language $C$, and $B$ is disjoint from $C$. Then $A \cup B$ is non-regular.


For the proof, consider the intersection of $A \cup B$ and $C$. Details left to the reader.

The question you link to concerns the language
$$
\{ a^p : p \text{ is prime} \} \cup \{ w : |w| \text{ is even} \} =
\{ a^p : p \text{ is an odd prime} \} \cup \{ w : |w| \text{ is even} \}.
$$
We can write this in the form $A \cup B$, where $A = \{ a^p : p \text{ is an odd prime}\}$ and $B = \{ w : |w| \text{ is even}\}$. Let $C = \{ w : |w| \text{ is odd} \}$. Applying the result above, we deduce that $A \cup B$ is non-regular (assuming we already know that $A$ is non-regular).