Sure, either one is fine. Just rinse thoroughly. The main risk to the shirt would be dye from the soap. If they are white or clear, no issue. If they are colored, I’d go with the dish soap, adding it to a sink full of water and sudsing it up before adding the shirt. The other risk would be skin irritation, so make sure to rinse out all the soap.
@JMMaok funny enough, the other way round (I hadn't even thought of that!): the dish soap is deep blue, the soap is… well, soap-coloured, idk what it's called. Milky off-white, makes for a colourless foam.