Can I use an android phone running Ice Cream Sandwich to test apps created in Gingerbread?
In short, yes. Android apps are upward compatible as @ce4 said. But if you are going to build an app, its best to compile it on the latest version of android, ie Jelly Bean 4.2.1. This question would have been better suited on StackOverflow.