Yes you can get both outputs with just a single forward pass. In HuggingFace Transformers, you can pass in output_hidden_states=True when performing a forward pass for a given model. This allows you to get both the logits (for classification) and the hidden states of all layers of the model.
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained(r"Z:\mymodel")
model = TFAutoModelForSequenceClassification.from_pretrained(r"Z:\mymodel")

text = "hello world"
encoding = tokenizer(text, return_tensors="tf")

# forward pass
outputs = model(encoding, output_hidden_states=True)

# get the logits
logits = outputs.logits
# get the hidden states
hidden_states = outputs.hidden_states

Note that the hidden_states are a tuple of tensors. It contains the hidden states of all layers, as well as the embedding layer. This means that you can get the last hidden states as hidden_states[-1].