I think, there two things here.
1.
General workflow get fastq files, map fastq files to the reference genome. The reference genome can really be anything. You can map you read to transcriptome or any other nucleotide sequences in the FASTA format.
With most of mapping tools that I know of including STAR there is two step process:
A. make index
B do the alignment
As an aside there are aligners out there that are "aware" of the splicing and there those that aren't "aware" of splicing e.g STAR and TopHat can detect splicing events whereas bwa and bowtie can't !
All you need GTF/GFF file for is to enable your aligner to identify splicing events in you RNA-seq data, obviously there won't be any splicing events in DNA-seq data.
In STAR you can, optionally, specify GTF file during indexing step (although in the latest release you can do that at the alignment step, but lets not worry about that for now), which enable STAR to detect splicing event.
If you don't care about your splicing event and maybe just care about differentially expressed genes, you don't really need to supply GTF file.
2.
As for different RNA types, Ensembl GTF file does hold that information under "gene_biotype" tag. I've attached a picture that might help, those three columns were parsed from standard Ensembl GTF file using custom python script (I need this for my own project).
As for parsing SAM file..I'm not sure about your strategy, maybe consult BioStars forums its really good for those things. In general SAM (sequence alignment map) just hold information about your mapping coordinates and no information about gene names and types.
Obviously if you are using reference FASTA file that just hold reference sequence for all possible non-coding RNAs, then yes you can just map to that file and use samtools to counts percentage of mapped reads.I guess to know if your sample contaminated with non-coding RNA's, but that still wouldn't give (directly) gene names..
Kirill