First a comment on terminology – AncestryDNA and none of the autosomal DNA testing companies do "DNA sequencing". They do use single nucleotide polymorphisms (SNP) and/or short tandem repeats (STR) testing to look at areas of common variation in the genome. But just to be clear, these companies are not doing sequencing of any significant part of your DNA. The exception would be full sequence mitochondrial DNA testing (because the length of mtDNA is comparatively so short). Whole genome sequencing, while quickly becoming cheaper and more accessible, is not (yet) widely used for genetic genealogy.
AncestryDNA and some of the other DNA companies do test a small number of YDNA SNPs as part of their autosomal test chip. Looking at my AncestryDNA raw file there are 1704 Y-DNA SNPs tested, which can in some cases be used to predict a rough Y-DNA haplogroup (this number of SNPs is less than the several thousand SNPs tested on other chromosomes). Note that in my case the subclade prediction on Morley's DNA tool was not correct once I had my Y-DNA later tested. I cannot comment on comparison to 23andMe as I have not tested with them.
I would say that while the Y-DNA prediction tools can be interesting they are no alternative to a Y-DNA specific test.