yes - you will both apply to either prelim or categorical AND rank either prelim and categorical. app and rank are 2 seperate things - see the following websites to answer all you questions:
you should apply, interview at, and rank prelim programs if you need to do a 1 year internship before moving onto programs that start at the PGY2 level (anesth, PMR, etc) - you should apply, interview at, and rank categ programs if you want to do a 3 year IM residency