This is a slightly corrected version of code I and others have used in MathGroup, StackOverflow, and MSE. It is at heart a recursive PolynomialReduce.
replacementFunction[expr_, rep_, vars_] :=
Module[{num = Numerator[expr], den = Denominator[expr],
hed = Head[expr], base, expon},
If[PolynomialQ[num, vars] &&
PolynomialQ[den, vars] && ! NumberQ[den],
replacementFunction[num, rep, vars]/
replacementFunction[den, rep, vars],
If[hed === Power && Length[expr] == 2,
base = replacementFunction[expr[[1]], rep, vars];
expon = replacementFunction[expr[[2]], rep, vars];
PolynomialReduce[base^expon, rep, vars][[2]],
If[Head[hed] === Symbol &&
MemberQ[Attributes[Evaluate[hed]], NumericFunction],
Map[replacementFunction[#, rep, vars] &, expr],
PolynomialReduce[expr, rep, vars][[2]]]]]]
On your example it will eliminate a variable. Whether this is useful depends on what you really require.
expr = Sqrt[((p^4 q^4 (p^2 - q^2))/(p^4 + q^4))]/
Sqrt[p^10 + p^2 q^8 + p^8 (-2 + q^2) + 2 p^4 q^4 (-2 + q^2) +
q^6 (-1 + q^2)^2 + p^6 (1 + 2 q^4)];
replacementFunction[expr, p^2 + q^2 - 1, {p, q}]
(* Out[299]= Sqrt[-((q^4 (-1 + q^2)^2 (-1 + 2 q^2))/(
1 - 2 q^2 + 2 q^4))]/Sqrt[-q^2 (-1 + q^2) (-1 + 2 q^2)^2] *)
$Assumptionsis similar to what you describe, but it probably won't help you much.) To make the question clear: give examples of calculations that you want to do withaandband explain how you need to use the relationship betweenaandbin those calculations. The answer to you question will depend on precisely what sorts of calculations you need to do and how this relationship will be used. – Szabolcs Jan 31 '14 at 23:41