For sure you can use multiple loss functions. For example PSPNet uses that extensively (called auxiliary output/loss). The below is such an example:

        out_seg, out_cls = model(x)
        seg_loss = seg_loss(out_seg, y_seg)
        cls_loss = cls_loss(out_cls, y_cls)
        loss = seg_loss + alpha * cls_loss
        loss.backward()
        optimizer.step()


So the model has two outputs (typically from an earlier layer and the final layer). In this case, one is trained on  classification and the other one on segmentation. The idea is that having a loss function directly on an earlier layer helps to train those earlier layers better.