You can transfer your results from Ancestry.com to Gedmatch and Family tree DNA. Both companies use a chromosome browser so you can match up your DNA segments to determine which of your DNA matches share the same DNA on same chromosome. All who share same DNA on same chromosome would share same ancestor or ancestors. Ancestry does not have this chromosome DNA matching feature.
The best DNA test to determine male line is Y-DNA which ancestry no longer offers. You would have to go to Family Tree DNA or 23andme for this test. You would need to find a living direct male who is in an unbroken line father to father to father to take this test. It can help prove or disprove if that male line matches others of the surname he carries or if that line may match a different surname. The more markers you test on Y-DNA the better.
Hope this helps