Variable length string validation against whitelisted characters
Instead of removing valid characters, you may look for invalid ones:

    private static readonly Regex ReferralCodeValidator = new Regex(
       @"[^ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789]",
       RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);

    public static bool IsValidReferralCode(this string code)
    {
        // preliminary tests omitted for brevity
        return !ReferralCodeValidator.Match(code).Success;
    }


I can't say if this solution is more elegant (beauty is in the eye of beholder), but it surely looks more straightforward.