Yes, BCEWithLogitsLoss would be the criterion, so your training loop most likely looks like this:
criterion = nn.BCEWithLogitsLoss()
model = MyModel()

for data, target in loader:
    optimizer.zero_grad()
    output = model(data)
    loss = criterion(output, target)
    loss.backward()
    optimizer.step()
    
    preds = torch.sigmoid(output)