It is legal to use the DME from a VORTAC station (see Is it possible for a civilian to use a VORTAC station? for details), but is it also legal to use the TACAN for bearing determination?
This would probably require different equipment, which is not typically installed on a civilian aircraft (see Why doesn't civil navigation equipment support TACAN? for details). But the answers to that question do not mention whether or not it is legal to install and use this equipment.