In an older house if you have the metal pipe for the toilet without a flange in the basement can you split the pipe and add the flange to use it for a sink drain too?

Install a ty fitting on the stack in the basement then run it to the sink. Put it low enough to account for a fall in the pipe, to allow proper drainage. Be sure to install a waste and vent pipe to code for both fixtures.