"AND if trains are running" may refer to this recent announcement:
Opinion on your York day trip: It can be done.
However, York is one of my favorite places in England, so I think a day trip is not enough time to do it justice.
I prefer York to London and believe a stay of 2-3 nights is a good idea.
But to answer your question, yes, a day trip can be done.
I understand that you don't want to overnight there; made clear from your post.
"is it too tight or tiring to make a London-York-London day trip?"
Only you know your energy level, so I cannot judge that for you.
Do see York Minster and do a walk around town.
Do get on top the old Roman and medieval town wall and walk it.