I’m not sure there is a clean way of handling different subsets within a single Dataset class.
If you want to handle the split yourself, I would rather create a custom function or class (if statefull) and return the corresponding dataset using e.g. TensorDataset or Subset.
E.g. this might be a usable code base:

class MyDatasetSplitter(object):
    def __init__(self, checkpoint, halfway):
        self.load()
        self.datasets = {}
        self.checkpoint = checkpoint
        self.halfway = halfway
        
    def load(self):    
        with open(file=file_name, mode='r') as f:
            self.data = f.readlines()

        self.datasets['train'] = TensorDataset(
            self.data[:self.checkpoint])
        self.dataset['valid'] = TensorDataset(
            self.data[self.checkpoint:self.halfway])
        self.datasets['test'] = TensorDataset(
            self.data[self.halfway:])
        
    def get_dataset(self, split):
        return self.datasets[split]

Would that work for your use case?
In this way, each split is a custom Dataset and can be wrapped by a DataLoader separately.