Yes, you can definitely get in to a good enough medicine residency to get into cardiology fellowship.
Your scores sound like my Step 1 and 2 scores. I went to a well known medical school, which probably helped somewhat. I wasn't particularly that high in my med school class, but I did work my a-- off. I think my letters of rec were good and Dean's letter was OK, though one could definitely tell I wasn't AOA, etc.
Go ahead and apply to IM. You will be fine. You'll find out that places will roll out the red carpet for you. There are just a lot of IM spots and not that many people applying.
If you are asking if an only-average Step 1 score will keep you out of, say, Harvard, well it could, especially if you don't have publications and/or a famous faculty member at your institution to write a letter of recommendation for you. There are probably only a few medicine programs that screen people out based on Step scores (like throw out everyone under 230). I think your Step 2 score will help you.
For what it's worth, USMLE scores really aren't "where it's at" for cardiology fellowship application. My 2 and 3 scores are high and while I think it did help me somewhat at some places I applied, cardiology is more of a "who you know" type of field. Letters of recommendation and where you went to residency become important. Where you went to med school may help somewhat if it's well known/competitive, but if it's not you can still match to a good cards program, particularly if they like your residency program.
I suggest to apply to good academic programs in the region of the country where you want to live, plus your own medical school. Consider applying to a "short track" program if you have any interest at all in research and/or academics, because by doing that you can get a guaranteed cardiology fellowship spot. they will take off 1 year of the 3 of medicine residency and add a research year as a "cardiology fellow". It's a fairly good deal, though usually requires at least 2 total years of research.